Lines Matching +full:instruction +full:- +full:fetch
1 perf-amd-ibs(1)
5 ----
6 perf-amd-ibs - Support for AMD Instruction-Based Sampling (IBS) with perf tool
9 --------
11 'perf record' -e ibs_op//
12 'perf record' -e ibs_fetch//
15 -----------
17 Instruction-Based Sampling (IBS) provides precise Instruction Pointer (IP)
19 Op and IBS Fetch. IBS Op sampling provides information about instruction
20 execution (micro-op execution to be precise) with details like d-cache
21 hit/miss, d-TLB hit/miss, cache miss latency, load/store data source, branch
22 behavior etc. IBS Fetch sampling provides information about instruction fetch
23 with details like i-cache hit/miss, i-TLB hit/miss, fetch latency etc. IBS is
24 per-smt-thread i.e. each SMT hardware thread contains standalone IBS units.
26 Both, IBS Op and IBS Fetch, are exposed as PMUs by Linux and can be exploited
33 IBS Op PMU supports two events: cycles and micro ops. IBS Fetch PMU supports
34 one event: fetch ops.
40 ------------------------
45 regular core PMU might not help for profiling with instruction level
54 -e cpu-cycles:p becomes -e ibs_op//
55 -e r076:p becomes -e ibs_op//
56 -e r0C1:p becomes -e ibs_op/cnt_ctl=1/
59 --------
64 System-wide profile, cycles event, sampling period: 100000
66 # perf record -e ibs_op// -c 100000 -a
68 Per-cpu profile (cpu10), cycles event, sampling period: 100000
70 # perf record -e ibs_op// -c 100000 -C 10
72 Per-cpu profile (cpu10), cycles event, sampling freq: 1000
74 # perf record -e ibs_op// -F 1000 -C 10
76 System-wide profile, uOps event, sampling period: 100000
78 # perf record -e ibs_op/cnt_ctl=1/ -c 100000 -a
82 # perf record -e ibs_op/cnt_ctl=1/ -c 100000 -a --raw-samples
84 System-wide profile, uOps event, sampling period: 100000, L3MissOnly (Zen4 onward)
86 # perf record -e ibs_op/cnt_ctl=1,l3missonly=1/ -c 100000 -a
90 # perf record -e ibs_op/cnt_ctl=1/ -c 100000 -p 1234
94 # perf record -e ibs_op/cnt_ctl=1/ -c 100000 -- ls
99 /* Select a line and press 'a' to drill down at instruction level. */
105 Raw dump of IBS registers when profiled with --raw-samples
107 # perf report -D
133 https://lore.kernel.org/r/20220921063638.2489-1-[email protected]
135 IBS Fetch PMU
138 Similar commands can be used with Fetch PMU as well.
140 System-wide profile, fetch ops event, sampling period: 100000
142 # perf record -e ibs_fetch// -c 100000 -a
144 System-wide profile, fetch ops event, sampling period: 100000, Random enable
146 # perf record -e ibs_fetch/rand_en=1/ -c 100000 -a
150 instruction over and over because of fixed sample period.
155 ---------------------
161 # perf mem record -c 100000 -- make
167 # perf mem report -F mem,sample,snoop
186 --------
188 linkperf:perf-record[1], linkperf:perf-script[1], linkperf:perf-report[1],
189 linkperf:perf-mem[1], linkperf:perf-c2c[1]