]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf doc: Document new IBS capabilities in man page
authorRavi Bangoria <ravi.bangoria@amd.com>
Fri, 8 May 2026 06:00:04 +0000 (06:00 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 23 May 2026 00:32:28 +0000 (21:32 -0300)
Include examples of:

o Privilege filter with Fetch and Op PMUs, including swfilt approach on
  Zen5 and older platforms and hardware assisted filter on Zen6 and newer
  platforms

o Streaming store filter with Op PMU

o Fetch latency filter with Fetch PMU

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ananth Narayan <ananth.narayan@amd.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Manali Shukla <manali.shukla@amd.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandipan Das <sandipan.das@amd.com>
Cc: Santosh Shukla <santosh.shukla@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-amd-ibs.txt

index 54854993576070c3e5e6260fef4c85417f90528f..253a7375c88ac1150233b83718b42859610f0514 100644 (file)
@@ -69,6 +69,14 @@ Per-cpu profile (cpu10), cycles event, sampling period: 100000
 
        # perf record -e ibs_op// -c 100000 -C 10
 
+Userspace only, per-cpu profile (cpu10), cycles event, sampling period: 100000
+
+       Zen6 onward (See NOTES):
+       # perf record -e ibs_op//u -c 100000 -C 10
+
+       Until Zen5:
+       # perf record -e ibs_op/swfilt=1/u -c 100000 -C 10
+
 Per-cpu profile (cpu10), cycles event, sampling freq: 1000
 
        # perf record -e ibs_op// -F 1000 -C 10
@@ -94,6 +102,11 @@ onward)
        Latency value which is a multiple of 128 incurs a little less profiling
        overhead compared to other values.
 
+System-wide profile, cycles event, sampling period: 100000, streaming store
+filter (Zen6 onward)
+
+       # perf record -e ibs_op/strmst=1/ -c 100000 -a
+
 Per process(upstream v6.2 onward), uOps event, sampling period: 100000
 
        # perf record -e ibs_op/cnt_ctl=1/ -c 100000 -p 1234
@@ -150,6 +163,14 @@ System-wide profile, fetch ops event, sampling period: 100000
 
        # perf record -e ibs_fetch// -c 100000 -a
 
+Userspace only, system-wide profile, fetch ops event, sampling period: 100000
+
+       Zen6 onward (See NOTES):
+       # perf record -e ibs_fetch//u -c 100000 -a
+
+       Until Zen5:
+       # perf record -e ibs_fetch/swfilt=1/u -c 100000 -a
+
 System-wide profile, fetch ops event, sampling period: 100000, Random enable
 
        # perf record -e ibs_fetch/rand_en=1/ -c 100000 -a
@@ -158,6 +179,15 @@ System-wide profile, fetch ops event, sampling period: 100000, Random enable
        helps in cases like long running loops where PMU is tagging the same
        instruction over and over because of fixed sample period.
 
+System-wide profile, fetch ops event, sampling period: 10000, fetch latency
+filter (Zen6 onward)
+
+       # perf record -e ibs_fetch/fetchlat=128/ -c 10000 -a
+
+       Supported fetch latency threshold values are 128 to 1920 (both inclusive).
+       Latency value which is a multiple of 128 incurs a little less profiling
+       overhead compared to other values.
+
 etc.
 
 PERF MEM AND PERF C2C
@@ -216,6 +246,15 @@ sort keys.  For example:
 
 Please refer to their man page for more detail.
 
+NOTES
+-----
+Hardware privilege filtering uses bit 63 to distinguish between kernel
+and userspace addresses. Hardware privilege filtering is not supported
+on 32-bit systems. Also, the bit 63 convention is not universal and can
+fail in specific environments, such as, using 64-bit host IBS to profile
+a 32-bit guest, using 64-bit host IBS to profile non-Linux 64-bit guests
+that do not adhere to the bit 63 privilege standard etc.
+
 SEE ALSO
 --------