diff options
author | Stephane Eranian <eranian@google.com> | 2013-01-24 16:10:27 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-04-01 12:15:04 -0300 |
commit | 9fac2cf316b070ae43d2ae2525e381ff2d1d68aa (patch) | |
tree | 526d974269e48f18be3d4e6191ea853d4ef800d9 /arch/x86/kernel/cpu/perf_event_intel_ds.c | |
parent | 3a54aaa0a3ddb2cf2ec1b94a94024e9a8a8af962 (diff) | |
download | kernel_goldelico_gta04-9fac2cf316b070ae43d2ae2525e381ff2d1d68aa.zip kernel_goldelico_gta04-9fac2cf316b070ae43d2ae2525e381ff2d1d68aa.tar.gz kernel_goldelico_gta04-9fac2cf316b070ae43d2ae2525e381ff2d1d68aa.tar.bz2 |
perf/x86: Add flags to event constraints
This patch adds a flags field to each event constraint.
It can be used to store event specific features which can
then later be used by scheduling code or low-level x86 code.
The flags are propagated into event->hw.flags during the
get_event_constraint() call. They are cleared during the
put_event_constraint() call.
This mechanism is going to be used by the PEBS-LL patches.
It avoids defining yet another table to hold event specific
information.
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: peterz@infradead.org
Cc: ak@linux.intel.com
Cc: jolsa@redhat.com
Cc: namhyung.kim@lge.com
Link: http://lkml.kernel.org/r/1359040242-8269-4-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel_ds.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_ds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c index 826054a..f30d85b 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c @@ -430,8 +430,10 @@ struct event_constraint *intel_pebs_constraints(struct perf_event *event) if (x86_pmu.pebs_constraints) { for_each_event_constraint(c, x86_pmu.pebs_constraints) { - if ((event->hw.config & c->cmask) == c->code) + if ((event->hw.config & c->cmask) == c->code) { + event->hw.flags |= c->flags; return c; + } } } |