From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Leo Yan <leo.yan@linaro.org>, James Clark <james.clark@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] perf auxtrace: Add 'T' itrace option for timestamp trace
Date: Mon, 6 Nov 2023 18:52:51 -0300 [thread overview]
Message-ID: <ZUlgM8pgf19UeyM9@kernel.org> (raw)
In-Reply-To: <8a2ea58f-f835-4d1a-8bd6-3a63b3b0db94@intel.com>
Em Thu, Oct 19, 2023 at 01:47:15PM +0300, Adrian Hunter escreveu:
> On 14/10/23 10:45, Leo Yan wrote:
> > An AUX trace can contain timestamp, but in some situations, the hardware
> > trace module (e.g. Arm CoreSight) cannot decide the traced timestamp is
> > the same source with CPU's time, thus the decoder can not use the
> > timestamp trace for samples.
> >
> > This patch introduces 'T' itrace option. If users know the platforms
>
> "If users know" <- how would users know? Could the kernel
> or tools also figure it out?
Adrian, I'm trying to go all the outstanding patches, do you still have
any issues with this series?
- Arnaldo
> > they are working on have the same time counter with CPUs, users can
> > use this new option to tell a decoder for using timestamp trace as
> > kernel time.
> >
> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > ---
> > tools/perf/Documentation/itrace.txt | 1 +
> > tools/perf/util/auxtrace.c | 3 +++
> > tools/perf/util/auxtrace.h | 3 +++
> > 3 files changed, 7 insertions(+)
> >
> > diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt
> > index a97f95825b14..19cc179be9a7 100644
> > --- a/tools/perf/Documentation/itrace.txt
> > +++ b/tools/perf/Documentation/itrace.txt
> > @@ -25,6 +25,7 @@
> > q quicker (less detailed) decoding
> > A approximate IPC
> > Z prefer to ignore timestamps (so-called "timeless" decoding)
> > + T use the timestamp trace as kernel time
> >
> > The default is all events i.e. the same as --itrace=iybxwpe,
> > except for perf script where it is --itrace=ce
> > diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> > index a0368202a746..f528c4364d23 100644
> > --- a/tools/perf/util/auxtrace.c
> > +++ b/tools/perf/util/auxtrace.c
> > @@ -1638,6 +1638,9 @@ int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts,
> > case 'Z':
> > synth_opts->timeless_decoding = true;
> > break;
> > + case 'T':
> > + synth_opts->use_timestamp = true;
> > + break;
> > case ' ':
> > case ',':
> > break;
> > diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
> > index 29eb82dff574..55702215a82d 100644
> > --- a/tools/perf/util/auxtrace.h
> > +++ b/tools/perf/util/auxtrace.h
> > @@ -99,6 +99,7 @@ enum itrace_period_type {
> > * @remote_access: whether to synthesize remote access events
> > * @mem: whether to synthesize memory events
> > * @timeless_decoding: prefer "timeless" decoding i.e. ignore timestamps
> > + * @use_timestamp: use the timestamp trace as kernel time
> > * @vm_time_correlation: perform VM Time Correlation
> > * @vm_tm_corr_dry_run: VM Time Correlation dry-run
> > * @vm_tm_corr_args: VM Time Correlation implementation-specific arguments
> > @@ -146,6 +147,7 @@ struct itrace_synth_opts {
> > bool remote_access;
> > bool mem;
> > bool timeless_decoding;
> > + bool use_timestamp;
> > bool vm_time_correlation;
> > bool vm_tm_corr_dry_run;
> > char *vm_tm_corr_args;
> > @@ -678,6 +680,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
> > " q: quicker (less detailed) decoding\n" \
> > " A: approximate IPC\n" \
> > " Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \
> > +" T: use the timestamp trace as kernel time\n" \
> > " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \
> > " concatenate multiple options. Default is iybxwpe or cewp\n"
> >
>
--
- Arnaldo
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Leo Yan <leo.yan@linaro.org>, James Clark <james.clark@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] perf auxtrace: Add 'T' itrace option for timestamp trace
Date: Mon, 6 Nov 2023 18:52:51 -0300 [thread overview]
Message-ID: <ZUlgM8pgf19UeyM9@kernel.org> (raw)
In-Reply-To: <8a2ea58f-f835-4d1a-8bd6-3a63b3b0db94@intel.com>
Em Thu, Oct 19, 2023 at 01:47:15PM +0300, Adrian Hunter escreveu:
> On 14/10/23 10:45, Leo Yan wrote:
> > An AUX trace can contain timestamp, but in some situations, the hardware
> > trace module (e.g. Arm CoreSight) cannot decide the traced timestamp is
> > the same source with CPU's time, thus the decoder can not use the
> > timestamp trace for samples.
> >
> > This patch introduces 'T' itrace option. If users know the platforms
>
> "If users know" <- how would users know? Could the kernel
> or tools also figure it out?
Adrian, I'm trying to go all the outstanding patches, do you still have
any issues with this series?
- Arnaldo
> > they are working on have the same time counter with CPUs, users can
> > use this new option to tell a decoder for using timestamp trace as
> > kernel time.
> >
> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > ---
> > tools/perf/Documentation/itrace.txt | 1 +
> > tools/perf/util/auxtrace.c | 3 +++
> > tools/perf/util/auxtrace.h | 3 +++
> > 3 files changed, 7 insertions(+)
> >
> > diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt
> > index a97f95825b14..19cc179be9a7 100644
> > --- a/tools/perf/Documentation/itrace.txt
> > +++ b/tools/perf/Documentation/itrace.txt
> > @@ -25,6 +25,7 @@
> > q quicker (less detailed) decoding
> > A approximate IPC
> > Z prefer to ignore timestamps (so-called "timeless" decoding)
> > + T use the timestamp trace as kernel time
> >
> > The default is all events i.e. the same as --itrace=iybxwpe,
> > except for perf script where it is --itrace=ce
> > diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> > index a0368202a746..f528c4364d23 100644
> > --- a/tools/perf/util/auxtrace.c
> > +++ b/tools/perf/util/auxtrace.c
> > @@ -1638,6 +1638,9 @@ int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts,
> > case 'Z':
> > synth_opts->timeless_decoding = true;
> > break;
> > + case 'T':
> > + synth_opts->use_timestamp = true;
> > + break;
> > case ' ':
> > case ',':
> > break;
> > diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
> > index 29eb82dff574..55702215a82d 100644
> > --- a/tools/perf/util/auxtrace.h
> > +++ b/tools/perf/util/auxtrace.h
> > @@ -99,6 +99,7 @@ enum itrace_period_type {
> > * @remote_access: whether to synthesize remote access events
> > * @mem: whether to synthesize memory events
> > * @timeless_decoding: prefer "timeless" decoding i.e. ignore timestamps
> > + * @use_timestamp: use the timestamp trace as kernel time
> > * @vm_time_correlation: perform VM Time Correlation
> > * @vm_tm_corr_dry_run: VM Time Correlation dry-run
> > * @vm_tm_corr_args: VM Time Correlation implementation-specific arguments
> > @@ -146,6 +147,7 @@ struct itrace_synth_opts {
> > bool remote_access;
> > bool mem;
> > bool timeless_decoding;
> > + bool use_timestamp;
> > bool vm_time_correlation;
> > bool vm_tm_corr_dry_run;
> > char *vm_tm_corr_args;
> > @@ -678,6 +680,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session,
> > " q: quicker (less detailed) decoding\n" \
> > " A: approximate IPC\n" \
> > " Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \
> > +" T: use the timestamp trace as kernel time\n" \
> > " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \
> > " concatenate multiple options. Default is iybxwpe or cewp\n"
> >
>
--
- Arnaldo
_______________________________________________
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:[~2023-11-06 21:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-14 7:45 [PATCH v1 0/2] perf cs-etm: Add support for itrace option 'T' Leo Yan
2023-10-14 7:45 ` Leo Yan
2023-10-14 7:45 ` [PATCH v1 1/2] perf auxtrace: Add 'T' itrace option for timestamp trace Leo Yan
2023-10-14 7:45 ` Leo Yan
2023-10-19 10:31 ` James Clark
2023-10-19 10:31 ` James Clark
2023-10-19 11:52 ` Leo Yan
2023-10-19 11:52 ` Leo Yan
2023-10-19 10:47 ` Adrian Hunter
2023-10-19 10:47 ` Adrian Hunter
2023-10-19 11:17 ` James Clark
2023-10-19 11:17 ` James Clark
2023-11-06 21:52 ` Arnaldo Carvalho de Melo [this message]
2023-11-06 21:52 ` Arnaldo Carvalho de Melo
2023-11-07 7:19 ` Adrian Hunter
2023-11-07 7:19 ` Adrian Hunter
2023-11-07 9:36 ` James Clark
2023-11-07 9:36 ` James Clark
2023-11-07 9:48 ` Leo Yan
2023-11-07 9:48 ` Leo Yan
2023-11-07 10:16 ` Adrian Hunter
2023-11-07 10:16 ` Adrian Hunter
2023-11-07 14:18 ` Leo Yan
2023-11-07 14:18 ` Leo Yan
2023-11-23 14:42 ` Arnaldo Carvalho de Melo
2023-11-23 14:42 ` Arnaldo Carvalho de Melo
2023-10-14 7:45 ` [PATCH v1 2/2] perf cs-etm: Enable itrace option 'T' Leo Yan
2023-10-14 7:45 ` Leo Yan
2023-10-19 10:38 ` James Clark
2023-10-19 10:38 ` 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=ZUlgM8pgf19UeyM9@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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: link
Be 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.