perf lock: Implement cpu and task filters for BPF
authorNamhyung Kim <namhyung@kernel.org>
Fri, 29 Jul 2022 20:07:56 +0000 (13:07 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 1 Aug 2022 12:28:51 +0000 (09:28 -0300)
commit6fda2405f414b24a6d4fc74f2b1ab24b7fe00d14
tree11506bea5fe13fbbcd2dac6f0a12b70d969a0a43
parent407b36f69efbdccf341ccc5be6a366ec0795aa83
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 <namhyung@kernel.org>
Cc: Blake Jones <blakejones@google.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220729200756.666106-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-lock.txt
tools/perf/builtin-lock.c
tools/perf/util/bpf_lock_contention.c
tools/perf/util/bpf_skel/lock_contention.bpf.c
tools/perf/util/lock-contention.h