Jing Zhang
7fded33c69
perf test: Add pmu-event test for "Compat" and new event_field.
...
Add new event test for uncore system event which is used to verify the
functionality of "Compat" matching multiple identifiers and the new event
fields "EventidCode" and "NodeType".
Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com >
Reviewed-by: Ian Rogers <irogers@google.com >
Tested-by: Ian Rogers <irogers@google.com >
Cc: James Clark <james.clark@arm.com >
Cc: Will Deacon <will@kernel.org >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Shuai Xue <xueshuai@linux.alibaba.com >
Cc: Zhuo Song <zhuo.song@linux.alibaba.com >
Cc: John Garry <john.g.garry@oracle.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-doc@vger.kernel.org
Link: https://lore.kernel.org/r/1695794391-34817-6-git-send-email-renyu.zj@linux.alibaba.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
2023-09-27 21:02:41 -07:00
Ian Rogers
e6ff1eed35
perf pmu: Lazily add JSON events
...
Rather than scanning all JSON events and adding them when a PMU is
created, add the alias when the JSON event is needed.
Average core PMU scanning run time reduced by 60.2%. Average PMU
scanning run time reduced by 15%. Page faults with no events reduced by
74 page faults, 4% of total.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Gaosheng Cui <cuigaosheng1@huawei.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230824041330.266337-14-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-08-24 11:08:47 -03:00
Ian Rogers
3d5045492a
perf pmu-events: Add pmu_events_table__find_event()
...
jevents stores events sorted by name. Add a find function that will
binary search event names avoiding the need to linearly search through
events.
Add a test in tests/pmu-events.c. If the PMU or event aren't found -1000
is returned. If the event is found but no callback function given, 0 is
returned.
This allows the find function also act as a test for existence.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Gaosheng Cui <cuigaosheng1@huawei.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230824041330.266337-9-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-08-24 11:02:22 -03:00
Ian Rogers
e3edd6cf63
perf pmu-events: Reduce processed events by passing PMU
...
Pass the PMU to pmu_events_table__for_each_event so that entries that
don't match don't need to be processed by callback.
If a NULL PMU is passed then all PMUs are processed.
'perf bench internals pmu-scan's "Average PMU scanning" performance is
reduced by about 5% on an Intel tigerlake.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Gaosheng Cui <cuigaosheng1@huawei.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230824041330.266337-8-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-08-24 11:00:09 -03:00
Ian Rogers
4000519eb0
perf pmu-events: Add extra underscore to function names
...
Add extra underscore before "for" of pmu_events_table_for_each_event
and pmu_metrics_table_for_each_metric.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Gaosheng Cui <cuigaosheng1@huawei.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230824041330.266337-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-08-24 10:43:19 -03:00
Ian Rogers
66c6e0c100
perf jevents: Add support for metricgroup descriptions
...
Metrics have a field where the groups they belong to are listed like
the following from
tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json:
"MetricGroup": "PGO;TmaL1;TopdownL1;tma_L1_group",
"MetricName": "tma_frontend_bound",
The metric groups are shown in 'perf list' like the following where
TopdownL1 is a metric group:
TopdownL1:
tma_backend_bound
[This category represents fraction of slots where no uops are being
delivered due to a lack of required resources for accepting new uops
in the Backend]
tma_bad_speculation
[This category represents fraction of slots wasted due to incorrect
speculations]
tma_frontend_bound
[This category represents fraction of slots where the processor's
Frontend undersupplies its Backend]
tma_retiring
[This category represents fraction of slots utilized by useful work
i.e. issued uops that eventually get retired]
This patch adds support for a new json file in each model directory
called metricgroups.json that comprises a dictionary containing
entries that map from a metric group to a description:
{
...
"TopdownL1": "Metrics for top-down breakdown at level 1",
...
}
perf list is then updated to support this changing the above output
to:
TopdownL1: [Metrics for top-down breakdown at level 1]
Committer notes:
Added a (int) cast to the ARRAY_SIZE() introduced in this patch to
address:
/tmp/build/perf-tools-next/pmu-events/pmu-events.c: In function ‘describe_metricgroup’:
/var/home/acme/git/perf-tools-next/tools/include/linux/kernel.h:102:25: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘18446744073709551615’ to ‘-1’ [-Werror=overflow]
102 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
/tmp/build/perf-tools-next/pmu-events/pmu-events.c:61603:29: note: in expansion of macro ‘ARRAY_SIZE’
61603 | int low = 0, high = ARRAY_SIZE(metricgroups) - 1;
| ^~~~~~~~~~
cc1: all warnings being treated as errors
Reviewed-by: Kan Liang <kan.liang@linux.intel.com >
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Richter <tmricht@linux.ibm.com >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Link: https://lore.kernel.org/r/20230517173805.602113-15-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-05-26 22:27:41 -03:00
Ian Rogers
07fc5921a0
perf test: Fix "PMU event table sanity" for NO_JEVENTS=1
...
A table was renamed and needed to be renamed in the empty case.
Fixes: 62774db2a0 ("perf jevents: Generate metrics and events as separate tables")
Reviewed-by: John Garry <john.g.garry@oracle.com >
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Ian Rogers <irogers@google.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: https://lore.kernel.org/r/20230308002714.1755698-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-03-14 08:39:56 -03:00
Ian Rogers
f8ea2c1524
perf pmu-events: Introduce pmu_metrics_table
...
Add a metrics table that is just a cast from pmu_events_table. This
changes the APIs so that event and metric usage of the underlying
table is different. For the no jevents case the tables are already
separate, later changes will separate the tables for the jevents case.
Reviewed-by: Kajol Jain <kjain@linux.ibm.com >
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Caleb Biggers <caleb.biggers@intel.com >
Cc: Florian Fischer <florian.fischer@muhq.space >
Cc: Ian Rogers <irogers@google.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.g.garry@oracle.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Kang Minchul <tegongkang@gmail.com >
Cc: Kim Phillips <kim.phillips@amd.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Perry Taylor <perry.taylor@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Cc: Sandipan Das <sandipan.das@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230126233645.200509-10-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-02-03 13:54:21 -03:00
Ian Rogers
96d2a74618
perf pmu-events: Separate the metrics from events for no jevents
...
Separate the event and metric table when building without jevents. Add
find_core_metrics_table and perf_pmu__find_metrics_table while
renaming existing utilities to be event specific, so that users can
find the right table for their need.
Committer notes:
Fix the build on aarch64 with:
tools/perf/arch/arm64/util/pmu.c
@@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
- return perf_pmu__find_table(pmu);
+ return perf_pmu__find_events_table(pmu);
Reviewed-by: John Garry <john.g.garry@oracle.com >
Reviewed-by: Kajol Jain <kjain@linux.ibm.com >
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Caleb Biggers <caleb.biggers@intel.com >
Cc: Florian Fischer <florian.fischer@muhq.space >
Cc: Ian Rogers <irogers@google.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Kang Minchul <tegongkang@gmail.com >
Cc: Kim Phillips <kim.phillips@amd.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Perry Taylor <perry.taylor@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Cc: Sandipan Das <sandipan.das@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230126233645.200509-6-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-02-03 13:53:52 -03:00
Ian Rogers
db95818e88
perf pmu-events: Add separate metric from pmu_event
...
Create a new pmu_metric for the metric related variables from pmu_event
but that is initially just a clone of pmu_event. Add iterators for
pmu_metric and use in places that metrics are desired rather than
events. Make the event iterator skip metric only events, and the metric
iterator skip event only events.
Reviewed-by: John Garry <john.g.garry@oracle.com >
Reviewed-by: Kajol Jain <kjain@linux.ibm.com >
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Caleb Biggers <caleb.biggers@intel.com >
Cc: Florian Fischer <florian.fischer@muhq.space >
Cc: Ian Rogers <irogers@google.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jing Zhang <renyu.zj@linux.alibaba.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Kang Minchul <tegongkang@gmail.com >
Cc: Kim Phillips <kim.phillips@amd.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Perry Taylor <perry.taylor@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Rob Herring <robh@kernel.org >
Cc: Sandipan Das <sandipan.das@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230126233645.200509-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2023-02-02 17:18:31 -03:00
Ian Rogers
0e4079154e
perf test: Adjust case of test metrics
...
Icelake and later architectures have slots events and SLOTS metrics
meaning case sensitivity is important. Make the test metrics case
agree with the name of the metrics.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Ahmad Yasin <ahmad.yasin@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Caleb Biggers <caleb.biggers@intel.com >
Cc: Florian Fischer <florian.fischer@muhq.space >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Miaoqian Lin <linmq006@gmail.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Perry Taylor <perry.taylor@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Samantha Alt <samantha.alt@intel.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Thomas Richter <tmricht@linux.ibm.com >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Link: https://lore.kernel.org/r/20221004021612.325521-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-10-06 08:03:52 -03:00
Ian Rogers
1ba3752aec
perf pmu-events: Hide the pmu_events
...
Hide that the pmu_event structs are an array with a new wrapper struct.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-12-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 15:02:08 -03:00
Ian Rogers
660842e468
perf pmu-events: Don't assume pmu_event is an array
...
The current code assumes that a struct pmu_event can be iterated over
forward until a NULL pmu_event is encountered.
This makes it difficult to refactor pmu_event.
Add a loop function taking a callback function that's passed the struct
pmu_event.
This way the pmu_event is only needed for one element and not an entire
array.
Switch existing code iterating over the pmu_event arrays to use the new
loop function pmu_events_table_for_each_event.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-11-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 15:01:31 -03:00
Ian Rogers
7ae5c03a27
perf pmu-events: Move test events/metrics to JSON
...
Move arrays of pmu_events into the JSON code so that it may be
regenerated and modified by the jevents.py script.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-10-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 15:01:15 -03:00
Ian Rogers
29be2fe0c1
perf pmu-events: Hide pmu_events_map
...
Move usage of the table to pmu-events.c so it may be hidden. By
abstracting the table the implementation can later be changed.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-8-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 15:00:47 -03:00
Ian Rogers
2519db2a9d
perf pmu-events: Hide pmu_sys_event_tables
...
Move usage of the table to pmu-events.c so it may be hidden. By
abstracting the table the implementation can later be changed.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-6-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 15:00:16 -03:00
Ian Rogers
f793ae185e
perf jevents: Remove the type/version variables
...
pmu_events_map has a type variable that is always initialized to "core"
and a version variable that is never read. Remove these from the API as
it is straightforward to add them back when necessary.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 14:58:40 -03:00
Ian Rogers
099b157c08
perf jevent: Add an 'all' architecture argument
...
When 'all' is passed as the architecture generate a mapping table for
all architectures. This simplifies testing. To identify the table for an
architecture add an arch variable to the pmu_events_map.
Signed-off-by: Ian Rogers <irogers@google.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: John Garry <john.garry@huawei.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Leo Yan <leo.yan@linaro.org >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mike Leach <mike.leach@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220812230949.683239-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-08-13 14:58:20 -03:00
Ian Rogers
00facc7609
perf jevents: Switch build to use jevents.py
...
Generate pmu-events.c using jevents.py rather than the binary built from
jevents.c.
Add a new config variable NO_JEVENTS that is set when there is no
architecture json or an appropriate python interpreter isn't present.
When NO_JEVENTS is defined the file pmu-events/empty-pmu-events.c is
copied and used as the pmu-events.c file.
Signed-off-by: Ian Rogers <irogers@google.com >
Tested-by: John Garry <john.garry@huawei.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Ananth Narayan <ananth.narayan@amd.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Andrew Kilroy <andrew.kilroy@arm.com >
Cc: Caleb Biggers <caleb.biggers@intel.com >
Cc: Felix Fietkau <nbd@nbd.name >
Cc: Ian Rogers <rogers.email@gmail.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: James Clark <james.clark@arm.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kajol Jain <kjain@linux.ibm.com >
Cc: Kan Liang <kan.liang@linux.intel.com >
Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com >
Cc: Like Xu <likexu@tencent.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Mathieu Poirier <mathieu.poirier@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Nick Forrington <nick.forrington@arm.com >
Cc: Paul Clarke <pc@us.ibm.com >
Cc: Perry Taylor <perry.taylor@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Qi Liu <liuqi115@huawei.com >
Cc: Ravi Bangoria <ravi.bangoria@amd.com >
Cc: Sandipan Das <sandipan.das@amd.com >
Cc: Santosh Shukla <santosh.shukla@amd.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Will Deacon <will@kernel.org >
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com >
Link: https://lore.kernel.org/r/20220629182505.406269-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2022-06-29 18:36:14 -03:00