From: Leo Yan <leo.yan@linaro.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, Jonathan Corbet <corbet@lwn.net>, John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Daniel Kiss <Daniel.Kiss@arm.com>, Denis Nikitin <denik@chromium.org>, Al Grant <al.grant@arm.com>, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v3 0/8] coresight: etm-perf: Fix pid tracing with VHE Date: Sat, 6 Feb 2021 23:08:25 +0800 [thread overview] Message-ID: <20210206150833.42120-1-leo.yan@linaro.org> (raw) This patch series is to support PID tracing with Virtualization Host Extensions (VHE). To be backward compatibility, and can both support PID tracing for the kernel is running at either EL1 or EL2, the two new PMU formats "contextid1" and "contextid2" are introduced, which works as switches to trace PID for EL1 kernel and EL2 kernel respectively. The existed PMU format "contextid" needs to be backward compatible for users, it's changed as an alias for "contextid1" on EL1 kernel and for "contextid2" on EL2 kernel. Therefore, even without setting "contextid" config, the perf tool can dynamically pick up the config for PID tracing, the user doesn't have to set the "contexid" config manually. This patch series can be cleanly applied on perf/core branch: commit cd07e536b020 ("Merge remote-tracking branch 'torvalds/master' into perf/core") ... and applied on the mainline kernel: commit 1e0d27fce010 ("Merge branch 'akpm' (patches from Andrew)") The patch series has been tested on Arm Juno-r2 board. Verified the kernel with EL1 and didn't find issue; after some hacking in kernel driver and tool to emulate the code paths for kernel on EL2, can see the code path is hit without failure. Changes from v2: * Split into two patches for clarification comment on perf options, one patch is for kernel change and the another one is for tools' change (Suzuki); * Simplified cs_etm__get_pid_fmt() to return ETM_OPT_CTXTID2 OR ETM_OPT_CTXTID, but not both (Suzuki); * Cached "pid_fmt" in cs_etm_decoder__set_tid() (Suzuki); * Refined documentation for more clear description for PMU format usages (Mike); * Added Suzuki's and Mike's Reviewed tags. Changes from v1: * Refactored PMU formats, added formats "contextid1"/"contextid2", and reworked format "contextid" (Suzuki/Mathieu); * Refined the comments for perf configs (Leo/Mike); * Added patch 07/07 for description PID tracing in docs; * Found the issue for bitmap for option, extracted patch 03/07 for the fixing. Changes from RFC: * Added comments to clarify cases requested (Leo); * Explain the change to generic flags for cs_etm_set_option() in the commit description; * Stored PID format in metadata and passed it to decoder (Leo); * Enhanced cs-etm for backward compatibility (Denis Nikitin). Leo Yan (4): coresight: etm-perf: Clarify comment on perf options tools headers UAPI: Update tools' copy of linux/coresight-pmu.h perf cs-etm: Add helper cs_etm__get_pid_fmt() Documentation: coresight: Add PID tracing description Suzuki K Poulose (4): coresight: etm-perf: Support PID tracing for kernel at EL2 perf cs-etm: Fix bitmap for option perf cs-etm: Support PID tracing in config perf cs-etm: Detect pid in VMID for kernel running at EL2 Documentation/trace/coresight/coresight.rst | 32 ++++++++ .../hwtracing/coresight/coresight-etm-perf.c | 32 +++++++- .../coresight/coresight-etm4x-core.c | 13 ++++ include/linux/coresight-pmu.h | 20 +++-- tools/include/linux/coresight-pmu.h | 20 +++-- tools/perf/arch/arm/util/cs-etm.c | 73 +++++++++++++++---- .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 38 +++++++++- tools/perf/util/cs-etm.c | 42 +++++++++++ tools/perf/util/cs-etm.h | 1 + 9 files changed, 239 insertions(+), 32 deletions(-) -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Leo Yan <leo.yan@linaro.org> To: Arnaldo Carvalho de Melo <acme@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, Jonathan Corbet <corbet@lwn.net>, John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Daniel Kiss <Daniel.Kiss@arm.com>, Denis Nikitin <denik@chromium.org>, Al Grant <al.grant@arm.com>, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan <leo.yan@linaro.org> Subject: [PATCH v3 0/8] coresight: etm-perf: Fix pid tracing with VHE Date: Sat, 6 Feb 2021 23:08:25 +0800 [thread overview] Message-ID: <20210206150833.42120-1-leo.yan@linaro.org> (raw) This patch series is to support PID tracing with Virtualization Host Extensions (VHE). To be backward compatibility, and can both support PID tracing for the kernel is running at either EL1 or EL2, the two new PMU formats "contextid1" and "contextid2" are introduced, which works as switches to trace PID for EL1 kernel and EL2 kernel respectively. The existed PMU format "contextid" needs to be backward compatible for users, it's changed as an alias for "contextid1" on EL1 kernel and for "contextid2" on EL2 kernel. Therefore, even without setting "contextid" config, the perf tool can dynamically pick up the config for PID tracing, the user doesn't have to set the "contexid" config manually. This patch series can be cleanly applied on perf/core branch: commit cd07e536b020 ("Merge remote-tracking branch 'torvalds/master' into perf/core") ... and applied on the mainline kernel: commit 1e0d27fce010 ("Merge branch 'akpm' (patches from Andrew)") The patch series has been tested on Arm Juno-r2 board. Verified the kernel with EL1 and didn't find issue; after some hacking in kernel driver and tool to emulate the code paths for kernel on EL2, can see the code path is hit without failure. Changes from v2: * Split into two patches for clarification comment on perf options, one patch is for kernel change and the another one is for tools' change (Suzuki); * Simplified cs_etm__get_pid_fmt() to return ETM_OPT_CTXTID2 OR ETM_OPT_CTXTID, but not both (Suzuki); * Cached "pid_fmt" in cs_etm_decoder__set_tid() (Suzuki); * Refined documentation for more clear description for PMU format usages (Mike); * Added Suzuki's and Mike's Reviewed tags. Changes from v1: * Refactored PMU formats, added formats "contextid1"/"contextid2", and reworked format "contextid" (Suzuki/Mathieu); * Refined the comments for perf configs (Leo/Mike); * Added patch 07/07 for description PID tracing in docs; * Found the issue for bitmap for option, extracted patch 03/07 for the fixing. Changes from RFC: * Added comments to clarify cases requested (Leo); * Explain the change to generic flags for cs_etm_set_option() in the commit description; * Stored PID format in metadata and passed it to decoder (Leo); * Enhanced cs-etm for backward compatibility (Denis Nikitin). Leo Yan (4): coresight: etm-perf: Clarify comment on perf options tools headers UAPI: Update tools' copy of linux/coresight-pmu.h perf cs-etm: Add helper cs_etm__get_pid_fmt() Documentation: coresight: Add PID tracing description Suzuki K Poulose (4): coresight: etm-perf: Support PID tracing for kernel at EL2 perf cs-etm: Fix bitmap for option perf cs-etm: Support PID tracing in config perf cs-etm: Detect pid in VMID for kernel running at EL2 Documentation/trace/coresight/coresight.rst | 32 ++++++++ .../hwtracing/coresight/coresight-etm-perf.c | 32 +++++++- .../coresight/coresight-etm4x-core.c | 13 ++++ include/linux/coresight-pmu.h | 20 +++-- tools/include/linux/coresight-pmu.h | 20 +++-- tools/perf/arch/arm/util/cs-etm.c | 73 +++++++++++++++---- .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 38 +++++++++- tools/perf/util/cs-etm.c | 42 +++++++++++ tools/perf/util/cs-etm.h | 1 + 9 files changed, 239 insertions(+), 32 deletions(-) -- 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-02-06 15:09 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-06 15:08 Leo Yan [this message] 2021-02-06 15:08 ` [PATCH v3 0/8] coresight: etm-perf: Fix pid tracing with VHE Leo Yan 2021-02-06 15:08 ` [PATCH v3 1/8] coresight: etm-perf: Clarify comment on perf options Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-06 15:08 ` [PATCH v3 2/8] tools headers UAPI: Update tools' copy of linux/coresight-pmu.h Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 17:34 ` Mathieu Poirier 2021-02-08 17:34 ` Mathieu Poirier 2021-02-06 15:08 ` [PATCH v3 3/8] coresight: etm-perf: Support PID tracing for kernel at EL2 Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-06 15:08 ` [PATCH v3 4/8] perf cs-etm: Fix bitmap for option Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 20:46 ` Mathieu Poirier 2021-02-08 20:46 ` Mathieu Poirier 2021-02-09 1:58 ` Leo Yan 2021-02-09 1:58 ` Leo Yan 2021-03-05 17:29 ` Arnaldo Carvalho de Melo 2021-03-05 17:29 ` Arnaldo Carvalho de Melo 2021-03-06 3:05 ` Leo Yan 2021-03-06 3:05 ` Leo Yan 2021-02-06 15:08 ` [PATCH v3 5/8] perf cs-etm: Support PID tracing in config Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 18:55 ` Mathieu Poirier 2021-02-08 18:55 ` Mathieu Poirier 2021-03-05 17:30 ` Arnaldo Carvalho de Melo 2021-03-05 17:30 ` Arnaldo Carvalho de Melo 2021-02-06 15:08 ` [PATCH v3 6/8] perf cs-etm: Add helper cs_etm__get_pid_fmt() Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 20:32 ` Mathieu Poirier 2021-02-08 20:32 ` Mathieu Poirier 2021-02-11 12:36 ` Suzuki K Poulose 2021-02-11 12:36 ` Suzuki K Poulose 2021-02-06 15:08 ` [PATCH v3 7/8] perf cs-etm: Detect pid in VMID for kernel running at EL2 Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 20:33 ` Mathieu Poirier 2021-02-08 20:33 ` Mathieu Poirier 2021-02-06 15:08 ` [PATCH v3 8/8] Documentation: coresight: Add PID tracing description Leo Yan 2021-02-06 15:08 ` Leo Yan 2021-02-08 20:50 ` Mathieu Poirier 2021-02-08 20:50 ` Mathieu Poirier 2021-02-08 21:15 ` Mike Leach 2021-02-08 21:15 ` Mike Leach 2021-02-11 12:38 ` Suzuki K Poulose 2021-02-11 12:38 ` Suzuki K Poulose
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=20210206150833.42120-1-leo.yan@linaro.org \ --to=leo.yan@linaro.org \ --cc=Daniel.Kiss@arm.com \ --cc=acme@kernel.org \ --cc=al.grant@arm.com \ --cc=corbet@lwn.net \ --cc=coresight@lists.linaro.org \ --cc=denik@chromium.org \ --cc=john.garry@huawei.com \ --cc=jolsa@redhat.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=mathieu.poirier@linaro.org \ --cc=mike.leach@linaro.org \ --cc=mingo@redhat.com \ --cc=namhyung@kernel.org \ --cc=peterz@infradead.org \ --cc=suzuki.poulose@arm.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.