From: Leo Yan <leo.yan@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Al Grant <Al.Grant@arm.com>,
"mathieu.poirier@linaro.org" <mathieu.poirier@linaro.org>,
Anshuman Khandual <Anshuman.Khandual@arm.com>,
"coresight@lists.linaro.org" <coresight@lists.linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"mike.leach@linaro.org" <mike.leach@linaro.org>
Subject: Re: [PATCH 3/3] rfc: perf: cs_etm: Detect pid in VMID for kernel running at EL2
Date: Fri, 13 Nov 2020 08:11:05 +0800 [thread overview]
Message-ID: <20201113001105.GA22708@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <a7e85575-d713-e7e4-e1d2-6aa259a8de1a@arm.com>
On Wed, Nov 11, 2020 at 11:40:03AM +0000, Suzuki Kuruppassery Poulose wrote:
> On 11/11/20 11:03 AM, Al Grant wrote:
[...]
> > But if you must do it heuristically at decode time based on what
> > you see in packets, then it would be safer to say that if you see both
> > VMID and CONTEXIDR, the TID will be in VMID.
>
> This may not be entirely correct, unless we correlate the VMID_OPT. Because,
> when we add Virtualization support (vmid == actual vmid).
>
> So we should do:
> if (VMID && VMIDOPT) {
> tid = pid;
> } else if (CID) {
>
> }
Rather than heuristic method, I think we can use metadata to store
"pid" entry in the function cs_etm_get_metadata(), so that in the
record phase, the "pid" is stored into perf data file.
When decode the trace data, we can retrieve "pid" value from the
metadata, and can base on the "pid" value to make decision for using
context_id or VMID.
The metadata can be accessed by referring
cs_etm_queue::cs_etm_auxtrace::metadata; but the file
util/cs-etm-decoder/cs-etm-decoder.c cannot directly access the
metadata structure due to "cs_etm_queue" and "cs_etm_auxtrace" both
are defined in util/cs-etm.c. It's better to introduce a helper
function in util/cs-etm.c to retrieve "pid" value, like:
u64 cs_etm__etmq_get_pid_type(struct cs_etm_queue *etmq);
Thanks,
Leo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-13 0:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 18:33 [PATCH 0/3] coresight: etm-perf: Fix pid tracing with VHE Suzuki K Poulose
2020-11-10 18:33 ` [PATCH 1/3] coresight: etm-perf: Add support for PID tracing for kernel at EL2 Suzuki K Poulose
2020-11-12 10:27 ` Leo Yan
2020-11-12 12:41 ` Suzuki K Poulose
2020-11-10 18:33 ` [PATCH 2/3] perf: cs_etm: Use pid tracing explicitly instead of contextid Suzuki K Poulose
2020-11-12 10:00 ` Leo Yan
2020-11-12 10:54 ` Suzuki K Poulose
2020-11-12 12:24 ` Leo Yan
2020-11-10 18:33 ` [PATCH 3/3] rfc: perf: cs_etm: Detect pid in VMID for kernel running at EL2 Suzuki K Poulose
2020-11-10 22:57 ` Suzuki K Poulose
2020-11-11 11:03 ` Al Grant
2020-11-11 11:40 ` Suzuki K Poulose
2020-11-13 0:11 ` Leo Yan [this message]
2020-11-13 9:47 ` Suzuki K Poulose
2020-11-13 10:42 ` Leo Yan
2020-11-16 9:46 ` Leo Yan
2020-12-18 10:46 ` Daniel Kiss
[not found] ` <CADDJ8CVqz8Gdkx42H+TjdBOS-Vjk4MAVV7PhAaeBNq9Ejh=usA@mail.gmail.com>
2020-12-23 8:05 ` Leo Yan
2021-01-04 17:33 ` Suzuki K Poulose
2021-01-04 18:06 ` Mathieu Poirier
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=20201113001105.GA22708@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=Al.Grant@arm.com \
--cc=Anshuman.Khandual@arm.com \
--cc=coresight@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.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