From: Yang Jihong <yangjihong1@huawei.com>
To: Leo Yan <leo.yan@linaro.org>
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: Tue, 29 Jun 2021 08:53:55 +0800 [thread overview]
Message-ID: <1bc5b36c-8138-4d14-c106-964682bf44dd@huawei.com> (raw)
In-Reply-To: <20210628072905.GB200044@leoy-ThinkPad-X240s>
Hello Leo,
On 2021/6/28 15:29, Leo Yan wrote:
> On Mon, Jun 28, 2021 at 02:30:56PM +0800, Yang Jihong wrote:
>> Hello Leo,
>>
>> On 2021/6/28 12:07, Leo Yan wrote:
>>> 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!
>>>
>> Thanks for the very detailed explanation.
>> To keep the correct relative time sequence between events in SPE and other
>> events, we should use kernel timestamp instead of arch time. Therefore, we
>> need to calibrate the time. Is this correct?
>
> Yes, correct!
I see. Thank you for your answer.:)
Jihong
> .
>
prev parent reply other threads:[~2021-06-29 0:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-26 3:21 [PATCH] perf arm-spe: Fix incorrect sample timestamp in perf script Yang Jihong
2021-06-28 1:49 ` Leo Yan
2021-06-28 3:45 ` Yang Jihong
2021-06-28 4:07 ` Leo Yan
2021-06-28 6:30 ` Yang Jihong
2021-06-28 7:29 ` Leo Yan
2021-06-29 0:53 ` Yang Jihong [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=1bc5b36c-8138-4d14-c106-964682bf44dd@huawei.com \
--to=yangjihong1@huawei.com \
--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=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=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).