diff options
author | Namhyung Kim <namhyung@kernel.org> | 2023-02-03 03:13:23 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-02-03 21:12:26 +0100 |
commit | 16cad1d3597d32e470a4115f11c5e61cce6cd81b (patch) | |
tree | df2f8221a90cd822e02476da0120c09207bb38a7 /tools/perf/util/Build | |
parent | perf lock contention: Factor out lock_contention_get_name() (diff) | |
download | linux-16cad1d3597d32e470a4115f11c5e61cce6cd81b.tar.xz linux-16cad1d3597d32e470a4115f11c5e61cce6cd81b.zip |
perf lock contention: Use lock_stat_find{,new}
This is a preparation work to support complex keys of BPF maps. Now it
has single value key according to the aggregation mode like stack_id or
pid. But we want to use a combination of those keys.
Then lock_contention_read() should still aggregate the result based on
the key that was requested by user. The other key info will be used for
filtering.
So instead of creating a lock_stat entry always, Check if it's already
there using lock_stat_find() first.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230203021324.143540-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/Build')
-rw-r--r-- | tools/perf/util/Build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 79b9498886a2..918b501f9bd8 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -154,7 +154,10 @@ perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o perf-$(CONFIG_PERF_BPF_SKEL) += bpf_ftrace.o perf-$(CONFIG_PERF_BPF_SKEL) += bpf_off_cpu.o -perf-$(CONFIG_PERF_BPF_SKEL) += bpf_lock_contention.o + +ifeq ($(CONFIG_LIBTRACEEVENT),y) + perf-$(CONFIG_PERF_BPF_SKEL) += bpf_lock_contention.o +endif ifeq ($(CONFIG_LIBTRACEEVENT),y) perf-$(CONFIG_PERF_BPF_SKEL) += bpf_kwork.o |