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)
commit16817ad7e8b31728b44ff9f17d8d894ed8a450d0
tree5d73d416cb0e2fe4b2f8f4c1a283ef3fff01a90b
parent3749d33e510c3dc695b3a5886b706310890d7ebd
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