diff options
author | Namhyung Kim <namhyung@kernel.org> | 2022-09-08 14:41:02 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-13 15:03:22 +0200 |
commit | 3749d33e510c3dc695b3a5886b706310890d7ebd (patch) | |
tree | 38264855d5b66b021dc61ae373b61daebd665e17 /arch/x86/events/amd/ibs.c | |
parent | perf/x86/intel: Optimize FIXED_CTR_CTRL access (diff) | |
download | linux-dev-3749d33e510c3dc695b3a5886b706310890d7ebd.tar.xz linux-dev-3749d33e510c3dc695b3a5886b706310890d7ebd.zip |
perf: Use sample_flags for callchain
So that it can call perf_callchain() only if needed. Historically it used
__PERF_SAMPLE_CALLCHAIN_EARLY but we can do that with sample_flags in the
struct perf_sample_data.
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-1-namhyung@kernel.org
Diffstat (limited to 'arch/x86/events/amd/ibs.c')
-rw-r--r-- | arch/x86/events/amd/ibs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c index c251bc44c088..dab094166693 100644 --- a/arch/x86/events/amd/ibs.c +++ b/arch/x86/events/amd/ibs.c @@ -798,8 +798,10 @@ fail: * recorded as part of interrupt regs. Thus we need to use rip from * interrupt regs while unwinding call stack. */ - if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN) + if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN) { data.callchain = perf_callchain(event, iregs); + data.sample_flags |= PERF_SAMPLE_CALLCHAIN; + } throttle = perf_event_overflow(event, &data, ®s); out: |