]> git.baikalelectronics.ru Git - kernel.git/commit
perf/bpf: Always use perf callchains if exist
authorNamhyung Kim <namhyung@kernel.org>
Thu, 8 Sep 2022 21:41:03 +0000 (14:41 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 13 Sep 2022 13:03:22 +0000 (15:03 +0200)
commitf075b74caefb6918782c846f9e1a89832fccaa6f
tree5d73d416cb0e2fe4b2f8f4c1a283ef3fff01a90b
parent57527e9c5f375b6951eae3985dddfc346510e997
perf/bpf: Always use perf callchains if exist

If the perf_event has PERF_SAMPLE_CALLCHAIN, BPF can use it for stack trace.
The problematic cases like PEBS and IBS already handled in the PMU driver and
they filled the callchain info in the sample data.  For others, we can call
perf_callchain() before the BPF handler.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220908214104.3851807-2-namhyung@kernel.org
kernel/bpf/stackmap.c
kernel/events/core.c