From: Leo Yan <leo.yan@linaro.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@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@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Kan Liang <kan.liang@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf session: Dump PERF_RECORD_TIME_CONV event
Date: Sat, 10 Apr 2021 22:57:41 +0800 [thread overview]
Message-ID: <20210410145741.GA6012@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <9e100c55-16b1-090e-1e81-334a55bd4b15@intel.com>
Hi Adrian,
On Sat, Apr 10, 2021 at 11:46:10AM +0300, Adrian Hunter wrote:
[...]
> Hi Leo
>
> I think there might be some more work related to this.
>
> Pedantically, shouldn't you cater for backward compatibility and
> not assume the following were in the perf.data file:
>
> __u64 time_cycles;
> __u64 time_mask;
> bool cap_user_time_zero;
> bool cap_user_time_short;
>
> That means checking the event size.
>
> Also PERF_RECORD_TIME_CONV should have its own byte-swapper instead of
> perf_event__all64_swap() - also checking event size.
>
> i.e. fixes for:
>
> commit d110162cafc80dad0622cfd40f3113aebb77e1bb
> Author: Leo Yan <leo.yan@linaro.org>
> Date: Mon Sep 14 19:53:09 2020 +0800
>
> perf tsc: Support cap_user_time_short for event TIME_CONV
Indeed! IIUC, should have three fixes with event size checking:
- One fix for dumping TIME_CONV event;
- One fix for byte-swapper (especially for bool values);
- One fix for commit d110162cafc80dad0622cfd40f3113aebb77e1bb;
Will follow up for the suggestions. Thanks a lot for your insight
review.
Leo
prev parent reply other threads:[~2021-04-10 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 3:19 Leo Yan
2021-04-10 8:46 ` Adrian Hunter
2021-04-10 14:57 ` Leo Yan [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=20210410145741.GA6012@leoy-ThinkPad-X240s \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--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®