diff options
author | David Carrillo-Cisneros <davidcc@google.com> | 2016-08-17 16:55:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-08-18 04:54:34 -0400 |
commit | e64cd6f73ff5a7eb4f8f759049ee24a3fe55e731 (patch) | |
tree | ffca2e50676f317fb9dacc52f378242358a45536 /arch/x86/events/intel | |
parent | d6a2f9035bfc27d0e9d78b13635dda9fb017ac01 (diff) |
perf/x86: Use PMUEF_READ_CPU_PKG in uncore events
Add flag to Intel's uncore and RAPL.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1471467307-61171-5-git-send-email-davidcc@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/events/intel')
-rw-r--r-- | arch/x86/events/intel/rapl.c | 2 | ||||
-rw-r--r-- | arch/x86/events/intel/uncore.c | 2 | ||||
-rw-r--r-- | arch/x86/events/intel/uncore_snb.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c index 28865938aadf..62bebcca64cc 100644 --- a/arch/x86/events/intel/rapl.c +++ b/arch/x86/events/intel/rapl.c | |||
@@ -357,6 +357,8 @@ static int rapl_pmu_event_init(struct perf_event *event) | |||
357 | if (event->cpu < 0) | 357 | if (event->cpu < 0) |
358 | return -EINVAL; | 358 | return -EINVAL; |
359 | 359 | ||
360 | event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG; | ||
361 | |||
360 | /* | 362 | /* |
361 | * check event is known (determines counter) | 363 | * check event is known (determines counter) |
362 | */ | 364 | */ |
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c index 463dc7a5a6c3..7b3cc8be3282 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c | |||
@@ -664,6 +664,8 @@ static int uncore_pmu_event_init(struct perf_event *event) | |||
664 | event->cpu = box->cpu; | 664 | event->cpu = box->cpu; |
665 | event->pmu_private = box; | 665 | event->pmu_private = box; |
666 | 666 | ||
667 | event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG; | ||
668 | |||
667 | event->hw.idx = -1; | 669 | event->hw.idx = -1; |
668 | event->hw.last_tag = ~0ULL; | 670 | event->hw.last_tag = ~0ULL; |
669 | event->hw.extra_reg.idx = EXTRA_REG_NONE; | 671 | event->hw.extra_reg.idx = EXTRA_REG_NONE; |
diff --git a/arch/x86/events/intel/uncore_snb.c b/arch/x86/events/intel/uncore_snb.c index 9d35ec0cb8fc..5f845eef9a4d 100644 --- a/arch/x86/events/intel/uncore_snb.c +++ b/arch/x86/events/intel/uncore_snb.c | |||
@@ -388,6 +388,8 @@ static int snb_uncore_imc_event_init(struct perf_event *event) | |||
388 | event->cpu = box->cpu; | 388 | event->cpu = box->cpu; |
389 | event->pmu_private = box; | 389 | event->pmu_private = box; |
390 | 390 | ||
391 | event->event_caps |= PERF_EV_CAP_READ_ACTIVE_PKG; | ||
392 | |||
391 | event->hw.idx = -1; | 393 | event->hw.idx = -1; |
392 | event->hw.last_tag = ~0ULL; | 394 | event->hw.last_tag = ~0ULL; |
393 | event->hw.extra_reg.idx = EXTRA_REG_NONE; | 395 | event->hw.extra_reg.idx = EXTRA_REG_NONE; |