Skip to content

Commit 899184b

Browse files
committed
Import pmcstat callgraph format
This eliminates the need for stackcollapse-pmc.pl and its dependency on Perl to import FreeBSD callgraphs. Tracing can be done completely with tools included in the base system. For example: ``` # kldload hwpmc # pmcstat -S instructions -O sample.out sleep 1 # pmcstat -R sample.out -G sample.graph ```
1 parent bbe0c57 commit 899184b

File tree

6 files changed

+696
-0
lines changed

6 files changed

+696
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@ inst_retired.any [35705 samples]
2+
3+
# comment ok
4+
// ignored
5+
6+
20.86% [7447] zfs_lz4_compress @ /boot/kernel/zfs.ko
7+
100.0% [7447] zio_compress_data
8+
100.0% [7447] zio_write_compress
9+
100.0% [7447] zio_execute
10+
100.0% [7447] taskqueue_run_locked @ /boot/kernel/kernel
11+
100.0% [7447] taskqueue_thread_loop
12+
100.0% [7447] fork_exit
13+
14+
14.44% [5156] fletcher_2_native @ /boot/kernel/zfs.ko
15+
50.62% [2610] arc_cksum_verify
16+
66.02% [1723] arc_buf_thaw
17+
86.48% [1490] dmu_buf_will_dirty_impl
18+
99.93% [1489] dmu_write_uio_dnode
19+
100.0% [1489] zfs_write
20+
100.0% [1489] zfs_freebsd_write
21+
100.0% [1489] VOP_WRITE_APV @ /boot/kernel/kernel
22+
100.0% [1489] vn_write
23+
100.0% [1489] vn_io_fault_doio
24+
100.0% [1489] vn_io_fault1
25+
100.0% [1489] vn_io_fault
26+
100.0% [1489] dofilewrite
27+
100.0% [1489] kern_pwritev
28+
100.0% [1489] sys_pwrite
29+
100.0% [1489] amd64_syscall
30+
00.07% [1] dmu_write_impl @ /boot/kernel/zfs.ko
31+
100.0% [1] dmu_write
32+
100.0% [1] metaslab_set_unflushed_txg
33+
100.0% [1] metaslab_unflushed_bump
34+
100.0% [1] spa_flush_metaslabs
35+
100.0% [1] spa_sync
36+
100.0% [1] txg_sync_thread
37+
100.0% [1] fork_exit @ /boot/kernel/kernel
38+
invalid line

sample/profiles/pmcstat/simple.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@ inst_retired.any [35705 samples]
2+
3+
20.86% [7447] zfs_lz4_compress @ /boot/kernel/zfs.ko
4+
100.0% [7447] zio_compress_data
5+
100.0% [7447] zio_write_compress
6+
100.0% [7447] zio_execute
7+
100.0% [7447] taskqueue_run_locked @ /boot/kernel/kernel
8+
100.0% [7447] taskqueue_thread_loop
9+
100.0% [7447] fork_exit
10+
11+
14.44% [5156] fletcher_2_native @ /boot/kernel/zfs.ko
12+
50.62% [2610] arc_cksum_verify
13+
66.02% [1723] arc_buf_thaw
14+
86.48% [1490] dmu_buf_will_dirty_impl
15+
99.93% [1489] dmu_write_uio_dnode
16+
100.0% [1489] zfs_write
17+
100.0% [1489] zfs_freebsd_write
18+
100.0% [1489] VOP_WRITE_APV @ /boot/kernel/kernel
19+
100.0% [1489] vn_write
20+
100.0% [1489] vn_io_fault_doio
21+
100.0% [1489] vn_io_fault1
22+
100.0% [1489] vn_io_fault
23+
100.0% [1489] dofilewrite
24+
100.0% [1489] kern_pwritev
25+
100.0% [1489] sys_pwrite
26+
100.0% [1489] amd64_syscall
27+
00.07% [1] dmu_write_impl @ /boot/kernel/zfs.ko
28+
100.0% [1] dmu_write
29+
100.0% [1] metaslab_set_unflushed_txg
30+
100.0% [1] metaslab_unflushed_bump
31+
100.0% [1] spa_flush_metaslabs
32+
100.0% [1] spa_sync
33+
100.0% [1] txg_sync_thread
34+
100.0% [1] fork_exit @ /boot/kernel/kernel

0 commit comments

Comments
 (0)