From: Leo Yan <leo.yan@linaro.org>
To: German Gomez <german.gomez@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
James Clark <james.clark@arm.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>,
Stephane Eranian <eranian@google.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [RFC] perf arm-spe: Track task context switch for cpu-mode events
Date: Mon, 1 Nov 2021 23:11:01 +0800 [thread overview]
Message-ID: <20211101151101.GA375622@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <354d76da-5402-5c24-516f-c1f7e58590fc@arm.com>
Hi German,
On Fri, Oct 29, 2021 at 11:51:16AM +0100, German Gomez wrote:
> Hi Leo,
>
> The current plan is to define a global flag in the `struct arm_spe` to
> select the method of pid tracing (context pkt, or switch events):
>
> struct arm_spe {
> /* ... */
> u8 use_ctx_pkt_for_pid;
> }
>
> The method could be determined by peeking at the top element of the
> `struct auxtrace_heap` at the beginning of the perf-report. If ctx
> packets have been collected, the first one should have a context_id !=
> -1. We could then tweak this part of Namhyung patch slightly:
Have one concern: if cannot find the context packet, will the decoder
drop the SPE packets until it find the first context packet? If this
is the case, I am concern the decoder will run out for all packets
and doesn't generate any samples if the SPE trace data doesn't contain
any context packet.
>
> if (!spe->use_ctx_pkt_for_pid &&
> (event->header.type == PERF_RECORD_SWITCH_CPU_WIDE ||
> event->header.type == PERF_RECORD_SWITCH))
> err = arm_spe_context_switch(spe, event, sample);
>
> Then we could apply patch [1] which wasn't fully merged in the end,
> including similar `if (spe->use_ctx_pkt_for_pid)` to collect the pid/tid
> from the context packets.
>
> What do you think?
Except the above concern, the solution looks good to me.
Thanks,
Leo
next prev parent reply other threads:[~2021-11-01 15:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 0:17 Namhyung Kim
2021-09-16 13:54 ` Leo Yan
2021-09-16 21:01 ` Namhyung Kim
2021-09-23 14:23 ` Leo Yan
2021-09-23 16:01 ` Namhyung Kim
2021-09-30 18:47 ` Stephane Eranian
2021-10-01 10:44 ` James Clark
2021-10-01 18:22 ` Stephane Eranian
2021-10-04 15:19 ` Leo Yan
2021-09-30 15:08 ` James Clark
2021-10-04 6:26 ` Leo Yan
2021-10-05 10:06 ` German Gomez
2021-10-06 9:36 ` Leo Yan
2021-10-06 16:09 ` Namhyung Kim
2021-10-08 11:07 ` German Gomez
2021-10-09 0:12 ` Namhyung Kim
2021-10-11 13:58 ` German Gomez
2021-10-11 14:29 ` Leo Yan
2021-10-12 11:07 ` German Gomez
2021-10-18 11:01 ` German Gomez
2021-10-18 13:23 ` Leo Yan
2021-10-19 12:21 ` German Gomez
2021-10-29 10:51 ` German Gomez
2021-11-01 15:11 ` Leo Yan [this message]
2021-11-01 15:36 ` German Gomez
2021-11-01 15:42 ` German Gomez
2021-10-06 14:06 ` James Clark
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=20211101151101.GA375622@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=german.gomez@arm.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®