]> Gentwo Git Trees - linux/.git/commit
perf lock: Add bpf maps for owner stack tracing
authorChun-Tse Shao <ctshao@google.com>
Thu, 27 Feb 2025 00:28:53 +0000 (16:28 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 28 Feb 2025 08:29:36 +0000 (00:29 -0800)
commit17ae7f904977f3d097004f91158abcc10e0df484
treed161e04c7c57f3ab76e9370b05b5dff7a6964525
parentc760174401f605cf63314d3817069a40945f0e0b
perf lock: Add bpf maps for owner stack tracing

Add a struct and few bpf maps in order to tracing owner stack.
`struct owner_tracing_data`: Contains owner's pid, stack id, timestamp for
  when the owner acquires lock, and the count of lock waiters.
`stack_buf`: Percpu buffer for retrieving owner stacktrace.
`owner_stacks`: For tracing owner stacktrace to customized owner stack id.
`owner_data`: For tracing lock_address to `struct owner_tracing_data` in
  bpf program.
`owner_stat`: For reporting owner stacktrace in usermode.

Signed-off-by: Chun-Tse Shao <ctshao@google.com>
Tested-by: Athira Rajeev <atrajeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20250227003359.732948-2-ctshao@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/bpf_lock_contention.c
tools/perf/util/bpf_skel/lock_contention.bpf.c
tools/perf/util/bpf_skel/lock_data.h