From 6fda2405f414b24a6d4fc74f2b1ab24b7fe00d14 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Fri, 29 Jul 2022 13:07:56 -0700 Subject: perf lock: Implement cpu and task filters for BPF Add -a/--all-cpus and -C/--cpu options for cpu filtering. Also -p/--pid and --tid options are added for task filtering. The short -t option is taken for --threads already. Tracking the command line workload is possible as well. $ sudo perf lock contention -a -b sleep 1 Signed-off-by: Namhyung Kim Cc: Blake Jones Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220729200756.666106-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-lock.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools/perf/Documentation') diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index b88bb72c77d4..7949d2e6891b 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -128,6 +128,23 @@ CONTENTION OPTIONS Use BPF program to collect lock contention stats instead of using the input data. +-a:: +--all-cpus:: + System-wide collection from all CPUs. + +-C:: +--cpu:: + Collect samples only on the list of CPUs provided. Multiple CPUs can be + provided as a comma-separated list with no space: 0,1. Ranges of CPUs + are specified with -: 0-2. Default is to monitor all CPUs. + +-p:: +--pid=:: + Record events on existing process ID (comma separated list). + +--tid=:: + Record events on existing thread ID (comma separated list). + SEE ALSO -------- -- cgit v1.2.3