Skip to content

Commit 35dd88b

Browse files
Stephane Eraniangregkh
authored andcommitted
perf/x86/intel: Allow PEBS multi-entry in watermark mode
[ Upstream commit c7a2865 ] This patch fixes a restriction/bug introduced by: 583feb0 ("perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS") The original patch prevented using multi-entry PEBS when wakeup_events != 0. However given that wakeup_events is part of a union with wakeup_watermark, it means that in watermark mode, PEBS multi-entry is also disabled which is not the intent. This patch fixes this by checking is watermark mode is enabled. Signed-off-by: Stephane Eranian <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Fixes: 583feb0 ("perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 59e1b23 commit 35dd88b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/events/intel/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,7 @@ static int intel_pmu_hw_config(struct perf_event *event)
28672867
return ret;
28682868

28692869
if (event->attr.precise_ip) {
2870-
if (!(event->attr.freq || event->attr.wakeup_events)) {
2870+
if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) {
28712871
event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD;
28722872
if (!(event->attr.sample_type &
28732873
~intel_pmu_free_running_flags(event)))

0 commit comments

Comments
 (0)