summaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/perf-top.txt
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2024-05-24 22:52:27 +0200
committerNamhyung Kim <namhyung@kernel.org>2024-05-30 19:05:57 +0200
commitaf752016340021d433a962063067e819dba889b1 (patch)
tree4cfbd4d243d26cffcf9955d15c72f3ad2d278805 /tools/perf/Documentation/perf-top.txt
parentperf bpf filter: Add uid and gid terms (diff)
downloadlinux-af752016340021d433a962063067e819dba889b1.tar.xz
linux-af752016340021d433a962063067e819dba889b1.zip
perf top: Allow filters on events
Allow filters to be added to perf top events. One use is to workaround issues with: ``` $ perf top --uid="$(id -u)" ``` which tries to scan /proc find processes belonging to the uid and can fail in such a pid terminates between the scan and the perf_event_open reporting: ``` Error: The sys_perf_event_open() syscall returned with 3 (No such process) for event (cycles:P). /bin/dmesg | grep -i perf may provide additional information. ``` A similar filter: ``` $ perf top -e cycles:P --filter "uid == $(id -u)" ``` doesn't fail this way. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Changbin Du <changbin.du@huawei.com> Cc: Yang Jihong <yangjihong1@huawei.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: bpf@vger.kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240524205227.244375-4-irogers@google.com
Diffstat (limited to 'tools/perf/Documentation/perf-top.txt')
-rw-r--r--tools/perf/Documentation/perf-top.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index a754875fa5bb..667e5102075e 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -43,6 +43,10 @@ Default is to monitor all CPUS.
encoding with the layout of the event control registers as described
by entries in /sys/bus/event_source/devices/cpu/format/*.
+--filter=<filter>::
+ Event filter. This option should follow an event selector (-e). For
+ syntax see linkperf:perf-record[1].
+
-E <entries>::
--entries=<entries>::
Display this many functions.