aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events/pmu-events.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-01-27 18:03:37 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-02-08 08:55:03 -0300
commitfedb2b518239cbc00abcf0d200e0be8436251c11 (patch)
tree8ab7fa4997f4b77d10f80bef73cdbdb550330998 /tools/perf/pmu-events/pmu-events.h
parentperf jevents: Parse eventcode as number (diff)
downloadlinux-dev-fedb2b518239cbc00abcf0d200e0be8436251c11.tar.xz
linux-dev-fedb2b518239cbc00abcf0d200e0be8436251c11.zip
perf jevents: Add support for parsing uncore json files
Handle the "Unit" field, which is needed to find the right PMU for an event. We call it "pmu" and convert it to the perf pmu name with an uncore prefix. Handle the "ExtSel" field, which just extends the event mask with an additional bit. Handle the "Filter" field which adds parameters to the main event to configure filtering. Handle the "Unit" field which declares the unit the values should be scaled too (similar to what the kernel exports) Set up the "perpkg" field for uncore events so that perf knows they are per package (similar to what the kernel exports) Then output the fields into the pmu-events data structures which are compiled into perf. Filter out zero fields, except for the event itself. v2: Fix compilation. Add uncore_ prefix at pre-processing time. Move eventcode change to separate patch. v3: Remove extra __maybe_unused v4: dont duplicate aliases for cpu pmu events Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20170128020345.19007-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/pmu-events.h')
-rw-r--r--tools/perf/pmu-events/pmu-events.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index 2eaef595d8a0..c669a3cdb9f0 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -10,6 +10,9 @@ struct pmu_event {
const char *desc;
const char *topic;
const char *long_desc;
+ const char *pmu;
+ const char *unit;
+ const char *perpkg;
};
/*