linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/12] Foundations for metric generation with Python
@ 2025-09-04  4:31 Ian Rogers
  2025-09-04  4:31 ` [PATCH v6 01/12] perf jevents: Allow multiple metricgroups.json files Ian Rogers
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ian Rogers @ 2025-09-04  4:31 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, James Clark, Xu Yang,
	linux-kernel, linux-perf-users, John Garry, Jing Zhang,
	Sandipan Das, Benjamin Gray

Metrics in the perf tool come in via json. Json doesn't allow
comments, line breaks, etc. making it an inconvenient way to write
metrics. Further, it is useful to detect when writing a metric that
the event specified is supported within the event json for a model.

These patches introduce infrastructure and fixes for the addition of
metrics written in python for Arm64, AMD Zen and Intel CPUs. Later
patches will introduce the metrics split apart by the vendor.

v6. Fix issue with '\-' escape not being '\\-' (reported-by Sandipan
    Das <sandidas@amd.com>) which didn't alter the generated json.

v5. Rebase on top of legacy hardware/cache changes that now generate
    events using python:
    https://lore.kernel.org/lkml/20250828205930.4007284-1-irogers@google.com/
    the v5 series is:
    https://lore.kernel.org/lkml/20250829030727.4159703-1-irogers@google.com/

v4. Rebase and small Build/Makefile tweak
    https://lore.kernel.org/lkml/20240926173554.404411-1-irogers@google.com/

v3. Some code tidying, make the input directory a command line
    argument, but no other functional or output changes.
    https://lore.kernel.org/lkml/20240314055051.1960527-1-irogers@google.com/

v2. Fixes two type issues in the python code but no functional or
    output changes.
    https://lore.kernel.org/lkml/20240302005950.2847058-1-irogers@google.com/

v1. https://lore.kernel.org/lkml/20240302005950.2847058-1-irogers@google.com/

Ian Rogers (12):
  perf jevents: Allow multiple metricgroups.json files
  perf jevents: Update metric constraint support
  perf jevents: Add descriptions to metricgroup abstraction
  perf jevents: Allow metric groups not to be named
  perf jevents: Support parsing negative exponents
  perf jevents: Term list fix in event parsing
  perf jevents: Add threshold expressions to Metric
  perf jevents: Move json encoding to its own functions
  perf jevents: Drop duplicate pending metrics
  perf jevents: Skip optional metrics in metric group list
  perf jevents: Build support for generating metrics from python
  perf jevents: Add load event json to verify and allow fallbacks

 tools/perf/.gitignore                  |   5 +
 tools/perf/Makefile.perf               |   2 +
 tools/perf/pmu-events/Build            |  51 +++++++-
 tools/perf/pmu-events/amd_metrics.py   |  42 +++++++
 tools/perf/pmu-events/arm64_metrics.py |  43 +++++++
 tools/perf/pmu-events/intel_metrics.py |  42 +++++++
 tools/perf/pmu-events/jevents.py       |   7 +-
 tools/perf/pmu-events/metric.py        | 168 +++++++++++++++++++++----
 tools/perf/pmu-events/metric_test.py   |   4 +
 9 files changed, 334 insertions(+), 30 deletions(-)
 create mode 100755 tools/perf/pmu-events/amd_metrics.py
 create mode 100755 tools/perf/pmu-events/arm64_metrics.py
 create mode 100755 tools/perf/pmu-events/intel_metrics.py

-- 
2.51.0.338.gd7d06c2dae-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-09-04  4:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04  4:31 [PATCH v6 00/12] Foundations for metric generation with Python Ian Rogers
2025-09-04  4:31 ` [PATCH v6 01/12] perf jevents: Allow multiple metricgroups.json files Ian Rogers
2025-09-04  4:31 ` [PATCH v6 02/12] perf jevents: Update metric constraint support Ian Rogers
2025-09-04  4:31 ` [PATCH v6 03/12] perf jevents: Add descriptions to metricgroup abstraction Ian Rogers
2025-09-04  4:31 ` [PATCH v6 04/12] perf jevents: Allow metric groups not to be named Ian Rogers
2025-09-04  4:32 ` [PATCH v6 05/12] perf jevents: Support parsing negative exponents Ian Rogers
2025-09-04  4:32 ` [PATCH v6 06/12] perf jevents: Term list fix in event parsing Ian Rogers
2025-09-04  4:32 ` [PATCH v6 07/12] perf jevents: Add threshold expressions to Metric Ian Rogers
2025-09-04  4:32 ` [PATCH v6 08/12] perf jevents: Move json encoding to its own functions Ian Rogers
2025-09-04  4:32 ` [PATCH v6 09/12] perf jevents: Drop duplicate pending metrics Ian Rogers
2025-09-04  4:32 ` [PATCH v6 10/12] perf jevents: Skip optional metrics in metric group list Ian Rogers
2025-09-04  4:32 ` [PATCH v6 11/12] perf jevents: Build support for generating metrics from python Ian Rogers
2025-09-04  4:32 ` [PATCH v6 12/12] perf jevents: Add load event json to verify and allow fallbacks Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).