From: German Gomez <german.gomez@arm.com>
To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org
Cc: German Gomez <german.gomez@arm.com>,
John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Leo Yan <leo.yan@linaro.org>, Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: [PATCH v1 0/4] Support register names from all architectures
Date: Wed, 1 Dec 2021 12:33:28 +0000 [thread overview]
Message-ID: <20211201123334.679131-1-german.gomez@arm.com> (raw)
The following changeset applies some corrections to the way system
registers are processed and presented when reading perf.data files using
the various perf tools.
The commit message from [4/4] shows how register names aren't correctly
presented when performing x-arch analysis of perf.data files (i.e.
recording in one arch, then reading the file from a different arch).
Please let me know if there are any concerns with this approach, or if
any improvements can be made for subsequent re-rolls of the changeset.
- [PATCH 1/4] Fixes a potential out-of-bounds access when reading the
values of the registers in the perf.data file.
- [PATCH 2/4] Modifies one of the callbacks in "struct scripting_ops"
so that the python version can obtain the correct register names.
- [PATCH 3/4] Adds header files with the register indices and names
from all architectures, which are used by the next patch.
- [PATCH 4/4] Refactors the function "perf_reg_name" so that it can
support registers from all architectures, not just the local one.
Thanks,
German
German Gomez (4):
perf tools: Prevent out-of-bounds access to registers
perf script: Add "struct machine" parameter to process_event callback
perf tools: Crete header files with register names
perf tools: Support register names from all architectures
tools/perf/arch/arm/include/perf_regs.h | 42 --------
tools/perf/arch/arm64/include/perf_regs.h | 76 -------------
tools/perf/arch/csky/include/perf_regs.h | 82 --------------
tools/perf/arch/mips/include/perf_regs.h | 69 ------------
tools/perf/arch/powerpc/include/perf_regs.h | 66 ------------
tools/perf/arch/riscv/include/perf_regs.h | 74 -------------
tools/perf/arch/s390/include/perf_regs.h | 78 --------------
tools/perf/arch/x86/include/perf_regs.h | 82 --------------
tools/perf/builtin-script.c | 26 ++---
tools/perf/util/event.h | 5 +-
tools/perf/util/perf_regs.c | 3 +
tools/perf/util/perf_regs.h | 33 +++++-
tools/perf/util/perf_regs_arm.h | 57 ++++++++++
tools/perf/util/perf_regs_arm64.h | 83 ++++++++++++++
tools/perf/util/perf_regs_csky.h | 101 ++++++++++++++++++
tools/perf/util/perf_regs_mips.h | 76 +++++++++++++
tools/perf/util/perf_regs_powerpc.h | 74 +++++++++++++
tools/perf/util/perf_regs_riscv.h | 81 ++++++++++++++
tools/perf/util/perf_regs_s390.h | 85 +++++++++++++++
tools/perf/util/perf_regs_x86.h | 87 +++++++++++++++
.../util/scripting-engines/trace-event-perl.c | 3 +-
.../scripting-engines/trace-event-python.c | 33 +++---
tools/perf/util/session.c | 25 ++---
tools/perf/util/trace-event-scripting.c | 3 +-
tools/perf/util/trace-event.h | 3 +-
25 files changed, 733 insertions(+), 614 deletions(-)
create mode 100644 tools/perf/util/perf_regs_arm.h
create mode 100644 tools/perf/util/perf_regs_arm64.h
create mode 100644 tools/perf/util/perf_regs_csky.h
create mode 100644 tools/perf/util/perf_regs_mips.h
create mode 100644 tools/perf/util/perf_regs_powerpc.h
create mode 100644 tools/perf/util/perf_regs_riscv.h
create mode 100644 tools/perf/util/perf_regs_s390.h
create mode 100644 tools/perf/util/perf_regs_x86.h
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-12-01 12:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 12:33 German Gomez [this message]
2021-12-01 12:33 ` [PATCH v1 1/4] perf tools: Prevent out-of-bounds access to registers German Gomez
2021-12-08 21:35 ` Jiri Olsa
2021-12-10 9:17 ` kajoljain
2021-12-10 13:38 ` Arnaldo Carvalho de Melo
2021-12-10 15:28 ` German Gomez
2021-12-10 16:19 ` Arnaldo Carvalho de Melo
2021-12-01 12:33 ` [PATCH v1 2/4] perf script: Add "struct machine" parameter to process_event callback German Gomez
2021-12-02 16:03 ` Athira Rajeev
2021-12-03 12:00 ` German Gomez
2021-12-13 18:22 ` Arnaldo Carvalho de Melo
2021-12-13 18:31 ` German Gomez
2021-12-13 19:59 ` Arnaldo Carvalho de Melo
2021-12-01 12:33 ` [PATCH v1 3/4] perf tools: Crete header files with register names German Gomez
2021-12-01 12:33 ` [PATCH v1 4/4] perf tools: Support register names from all architectures German Gomez
2021-12-03 9:38 ` German Gomez
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=20211201123334.679131-1-german.gomez@arm.com \
--to=german.gomez@arm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=john.garry@huawei.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=namhyung@kernel.org \
--cc=will@kernel.org \
/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).