mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Jan Bernloehr <jbernloehr@nvidia.com>
Cc: Leo Yan <leo.yan@linux.dev>, Will Deacon <will@kernel.org>,
	Mike Leach <mike.leach@arm.com>,
	John Garry <john.garry@linux.dev>,
	Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Matt Ochs <mochs@nvidia.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf arm-spe: Honor --time ranges when synthesizing samples
Date: Tue, 1 Dec 2026 11:56:31 +0000	[thread overview]
Message-ID: <640ec2fc-12a8-4ea2-9332-4c8285204db1@linaro.org> (raw)
In-Reply-To: <20261129092936.44711-1-jbernloehr@nvidia.com>



On 29/11/2026 09:29, Jan Bernloehr wrote:
> On 27/11/2026 13:07, James Clark wrote:
>> Do you care that timestamps don't always increase? Seems like it would
>> be acceptable to stop after the first timestamp that you see outside of
>> the range, even if there are some edge cases where there may be an
>> earlier one later.
>>
>> Also can you elaborate why they don't always increase? I would have
>> thought that they would always generally increase in SPE data, if not
>> for some allowance for instruction re-ordering or something like that.
>> But that would be tiny and not really relevant for this feature.
> 
> Hi James,
> 
> Thanks for the review. You're right, real timestamps do increase, and
> the commit message is wrong there.
> 
> What I actually hit: on some CPUs the first SPE record in the trace
> carries a stale timestamp from before the session started (0, or days
> old). tsc_to_perf_time() wraps it, so the sample lands about 2^61 ns

A zero timestamp could be V2 erratum 2813408, but "days old" would be 
something new wouldn't it? It says that timestamps could only be "zero 
or off by one tick in some cases".

> in the future. With the early stop, that one record ended the CPU's
> whole queue, which cut a fifth of the in-range samples on one trace.
> 
> For v2 I'd bring the early stop back, skip records timestamped before
> time_cycles, and fix the commit message. Does that sound OK?
> 
> Thanks,
> Jan

I think we should dig into what the root cause is before coming up with 
anything. Can you share a perf.data file that has the issue? Maybe one 
file with the 0 timestamp and one with the days old timestamp.

0 would be easy to workaround because it can easily ignored or treated 
as invalid, but the other issue needs more investigation.


      reply	other threads:[~2026-12-01 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 12:38 Jan Bernloehr
2026-11-27 13:07 ` James Clark
2026-11-29  9:29   ` Jan Bernloehr
2026-12-01 11:56     ` James Clark [this message]

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=640ec2fc-12a8-4ea2-9332-4c8285204db1@linaro.org \
    --to=james.clark@linaro.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jbernloehr@nvidia.com \
    --cc=john.garry@linux.dev \
    --cc=leo.yan@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mike.leach@arm.com \
    --cc=mochs@nvidia.com \
    --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

all inboxes | Powered by JetHome®