diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2023-10-25 13:16:21 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-10-27 15:05:09 +0200 |
commit | 1f2376cd03dd3b965d130ed46a7c92769d614ba1 (patch) | |
tree | 60be778b77f2f089cf348afce0f701ffe22650be /arch/x86/events | |
parent | 85846b27072defc7ab3dcee7ff36563a040079dc (diff) |
perf: Add branch_sample_call_stack
Add a helper function to check call stack sample type.
The later patch will invoke the function in several places.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20231025201626.3000228-3-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events')
-rw-r--r-- | arch/x86/events/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 40c9af124128..09050641ce5d 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -601,7 +601,7 @@ int x86_pmu_hw_config(struct perf_event *event) } } - if (event->attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK) + if (branch_sample_call_stack(event)) event->attach_state |= PERF_ATTACH_TASK_DATA; /* |