mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Yang Jihong <yangjihong1@huawei.com>
Cc: john.garry@huawei.com, will@kernel.org,
	mathieu.poirier@linaro.org, peterz@infradead.org,
	mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	namhyung@kernel.org, james.clark@arm.com, andre.przywara@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf arm-spe: Fix incorrect sample timestamp in perf script
Date: Mon, 28 Jun 2021 12:07:16 +0800	[thread overview]
Message-ID: <20210628040716.GC163942@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <75dac5f8-9c82-0db1-d362-44289dcaa206@huawei.com>

On Mon, Jun 28, 2021 at 11:45:07AM +0800, Yang Jihong wrote:

[...]

> The timestamp does not match. Each timestamp has a difference of
> 213.98296702 seconds. Is the command I executed wrong?

I don't understand what's your meaning "a difference of 213.98296702
seconds".

But let me give an explaination with your below examples.  You could
the command "perf script" outputs the timestamp 314938.859071370 which
is the kernel's timestamp, if using the command "perf script -D", it
outputs the value 31515284203839 which is the Arch timer's raw counter
value.

In theory, the arch timer's counter is enabled at the very early
time before kernel's booting (e.g. bootloaders, UEFI, etc...).  So for
the kernel's timestamp, it should calibrate the timestamp and reduce
the offset prior to the kernel's booting.  I think this is the reason
why you observed 213.98296702 seconds difference (if compared with
your own patch?)

If still see any issue, please let me know.  Thanks a lot for the
testing!

Leo

> |symbol_address|perf script| perf script -D|
> |ffffb7ee2a20e100|314938.859071370|31515284203839|
> |ffffb7ee29f360e0|314938.859753820|31515284272084|
> |fffe85dd87e0|314938.859820430|31515284278745|
> |fffe85dd7a28|314938.859941110|31515284290813|
> |fffe85dd7a28|314938.859948890|31515284291591|
> |fffe85dc8f58|314938.859953610|31515284292063|

  reply	other threads:[~2021-06-28  4:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26  3:21 Yang Jihong
2021-06-28  1:49 ` Leo Yan
2021-06-28  3:45   ` Yang Jihong
2021-06-28  4:07     ` Leo Yan [this message]
2021-06-28  6:30       ` Yang Jihong
2021-06-28  7:29         ` Leo Yan
2021-06-29  0:53           ` Yang Jihong

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=20210628040716.GC163942@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andre.przywara@arm.com \
    --cc=james.clark@arm.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@redhat.com \
    --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=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=yangjihong1@huawei.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

all inboxes | Powered by JetHome®