Skip to content

Commit e64cd6f

Browse files
David Carrillo-CisnerosIngo Molnar
authored andcommitted
perf/x86: Use PMUEF_READ_CPU_PKG in uncore events
Add flag to Intel's uncore and RAPL. Signed-off-by: David Carrillo-Cisneros <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Stephane Eranian <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Turner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vegard Nossum <[email protected]> Cc: Vince Weaver <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent d6a2f90 commit e64cd6f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

arch/x86/events/intel/rapl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ static int rapl_pmu_event_init(struct perf_event *event)
357357
if (event->cpu < 0)
358358
return -EINVAL;
359359

360+
event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG;
361+
360362
/*
361363
* check event is known (determines counter)
362364
*/

arch/x86/events/intel/uncore.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ static int uncore_pmu_event_init(struct perf_event *event)
664664
event->cpu = box->cpu;
665665
event->pmu_private = box;
666666

667+
event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG;
668+
667669
event->hw.idx = -1;
668670
event->hw.last_tag = ~0ULL;
669671
event->hw.extra_reg.idx = EXTRA_REG_NONE;

arch/x86/events/intel/uncore_snb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ static int snb_uncore_imc_event_init(struct perf_event *event)
388388
event->cpu = box->cpu;
389389
event->pmu_private = box;
390390

391+
event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG;
392+
391393
event->hw.idx = -1;
392394
event->hw.last_tag = ~0ULL;
393395
event->hw.extra_reg.idx = EXTRA_REG_NONE;

0 commit comments

Comments
 (0)