All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] perf lock contention: Support task/addr aggregation mode (v1)
@ 2022-12-09 19:07 Namhyung Kim
  2022-12-09 19:07 ` [PATCH 1/4] perf lock contention: Add lock_data.h for common data Namhyung Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Namhyung Kim @ 2022-12-09 19:07 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers, Adrian Hunter,
	linux-perf-users, Song Liu, Blake Jones, bpf

Hello,

This patchset adds two more aggregation modes for perf lock contention.

The first one is the per-task mode with -t/--threads option.  The option
was there already but it remained broken with BPF for a while.  Now it
supports the output with and without BPF.

  # perf lock contention -a -b -t -- sleep 1
   contended   total wait     max wait     avg wait          pid   comm

          11     11.85 us      2.23 us      1.08 us            0   swapper
           2     11.13 us     10.22 us      5.56 us       749053   ThreadPoolForeg
           1      8.15 us      8.15 us      8.15 us       321353   Chrome_ChildIOT
           2      2.73 us      1.77 us      1.37 us       320761   Chrome_ChildIOT
           1      1.40 us      1.40 us      1.40 us       320502   chrome
           1       379 ns       379 ns       379 ns       321227   chrome

The other one is the per-lock-instance mode with -l/--lock-addr option.
If the lock has a symbol, it will be displayed as well.

  # perf lock contention -a -b -l -- sleep 1
   contended   total wait     max wait     avg wait            address   symbol

           3      4.79 us      2.33 us      1.60 us   ffffffffbaed50c0   rcu_state
           4      4.19 us      1.62 us      1.05 us   ffffffffbae07a40   jiffies_lock
           1      1.94 us      1.94 us      1.94 us   ffff9262277861e0
           1       387 ns       387 ns       387 ns   ffff9260bfda4f60

It's based on the current acme/tmp.perf/core branch.
You can find the code in the 'perf/lock-con-aggr-v1' branch in

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


Namhyung Kim (4):
  perf lock contention: Add lock_data.h for common data
  perf lock contention: Implement -t/--threads option for BPF
  perf lock contention: Add -l/--lock-addr option
  perf test: Update perf lock contention test

 tools/perf/Documentation/perf-lock.txt        |  4 +
 tools/perf/builtin-lock.c                     | 95 ++++++++++++++-----
 tools/perf/tests/shell/lock_contention.sh     | 48 ++++++++++
 tools/perf/util/bpf_lock_contention.c         | 72 ++++++++++----
 .../perf/util/bpf_skel/lock_contention.bpf.c  | 67 +++++++++----
 tools/perf/util/bpf_skel/lock_data.h          | 30 ++++++
 tools/perf/util/lock-contention.h             |  1 +
 7 files changed, 255 insertions(+), 62 deletions(-)
 create mode 100644 tools/perf/util/bpf_skel/lock_data.h


base-commit: b22802e295a80ec16e355d7208d2fbbd7bbc1b7a
-- 
2.39.0.rc1.256.g54fd8350bd-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-12-12 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-09 19:07 [PATCH 0/4] perf lock contention: Support task/addr aggregation mode (v1) Namhyung Kim
2022-12-09 19:07 ` [PATCH 1/4] perf lock contention: Add lock_data.h for common data Namhyung Kim
2022-12-12 19:42   ` Arnaldo Carvalho de Melo
2022-12-12 19:43     ` Arnaldo Carvalho de Melo
2022-12-12 19:45       ` Arnaldo Carvalho de Melo
2022-12-12 20:04         ` Namhyung Kim
2022-12-09 19:07 ` [PATCH 2/4] perf lock contention: Implement -t/--threads option for BPF Namhyung Kim
2022-12-09 19:07 ` [PATCH 3/4] perf lock contention: Add -l/--lock-addr option Namhyung Kim
2022-12-09 19:07 ` [PATCH 4/4] perf test: Update perf lock contention test Namhyung Kim
2022-12-12 19:58 ` [PATCH 0/4] perf lock contention: Support task/addr aggregation mode (v1) Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.