From: John Garry <john.g.garry@oracle.com>
To: Ian Rogers <irogers@google.com>,
Weilin Wang <weilin.wang@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Jing Zhang <renyu.zj@linux.alibaba.com>,
Sandipan Das <sandipan.das@amd.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] perf jevents: Autogenerate empty-pmu-events.c
Date: Tue, 28 May 2024 11:00:47 +0100 [thread overview]
Message-ID: <a173525f-33a9-43ee-8b03-a277810025fc@oracle.com> (raw)
In-Reply-To: <20240525013021.436430-2-irogers@google.com>
On 25/05/2024 02:30, Ian Rogers wrote:
> empty-pmu-events.c exists so that builds may occur without python
> being installed on a system. > Manually updating empty-pmu-events.c to
> be in sync with jevents.py is a pain, let's use jevents.py to generate
> empty-pmu-events.c.
>
> 1) change jevents.py so that an arch and model of none cause
> generation of a pmu-events.c without any json. Add a SPDX and
> autogenerated warning to the start of the file.
>
> 2) change Build so that if a generated pmu-events.c for arch none and
> model none doesn't match empty-pmu-events.c the build fails with a
> cat of the differences. Update Makefile.perf to clean up the files
> used for this.
>
> 3) update empty-pmu-events.c to match the output of jevents.py with
> arch and mode of none.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
> ---
> tools/perf/Makefile.perf | 2 +
> tools/perf/pmu-events/Build | 12 +-
> tools/perf/pmu-events/empty-pmu-events.c | 894 ++++++++++++++---------
> tools/perf/pmu-events/jevents.py | 6 +-
> 4 files changed, 562 insertions(+), 352 deletions(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.per
...
> - },
> +struct pmu_table_entry {
> + const struct compact_pmu_event *entries;
> + uint32_t num_entries;
> + struct compact_pmu_event pmu_name;
> +};
> +
> +static const char *const big_c_string =
> +/* offset=0 */ "default_core\000"
> +/* offset=13 */ "bp_l1_btb_correct\000branch\000L1 BTB Correction\000event=0x8a\000\00000\000\000"
> +/* offset=72 */ "bp_l2_btb_correct\000branch\000L2 BTB Correction\000event=0x8b\000\00000\000\000"
Please remind me: how to figure out this number when adding a new entry?
> +/* offset=131 */ "l3_cache_rd\000cache\000L3 cache access, read\000event=0x40\000\00000\000Attributable Level 3 cache access, read\000"
next prev parent reply other threads:[~2024-05-28 10:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 1:30 [PATCH v2 1/2] perf jevents: Use name for special find value Ian Rogers
2024-05-25 1:30 ` [PATCH v2 2/2] perf jevents: Autogenerate empty-pmu-events.c Ian Rogers
2024-05-28 10:00 ` John Garry [this message]
2024-05-28 15:14 ` Ian Rogers
2024-05-31 8:16 ` kernel test robot
2024-05-31 16:38 ` Ian Rogers
2024-06-03 14:19 ` Oliver Sang
2024-06-03 15:46 ` Ian Rogers
2024-06-12 21:46 ` Ian Rogers
2024-06-13 3:04 ` Oliver Sang
2024-07-16 0:23 ` Ian Rogers
2024-07-16 2:39 ` Oliver Sang
2024-07-29 19:18 ` Ian Rogers
2024-07-30 1:47 ` Oliver Sang
2024-05-28 9:55 ` [PATCH v2 1/2] perf jevents: Use name for special find value John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a173525f-33a9-43ee-8b03-a277810025fc@oracle.com \
--to=john.g.garry@oracle.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=sandipan.das@amd.com \
--cc=weilin.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).