From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jeremie Galarneau <jgalar@efficios.com>,
Namhyung Kim <namhyung@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH 4/8] perf data: Add a 'perf' prefix to the generic fields
Date: Thu, 11 Dec 2014 21:22:59 +0100 [thread overview]
Message-ID: <5489FD23.6000002@linutronix.de> (raw)
In-Reply-To: <5489F4D2.3020806@gmail.com>
On 12/11/2014 08:47 PM, David Ahern wrote:
> On 12/11/14 11:57 AM, Sebastian Andrzej Siewior wrote:
>>>> $ babeltrace ./ctf-data/
>>>> [03:19:13.962131936] (+0.000001935) cycles: { }, { perf_ip =
>>>> 0xFFFFFFFF8105443A, perf_tid = 20714, perf_pid = 20714, perf_period
>>>> = 8 }
>>>> [03:19:13.962133732] (+0.000001796) cycles: { }, { perf_ip =
>>>> 0xFFFFFFFF8105443A, perf_tid = 20714, perf_pid = 20714, perf_period =
>>>> 114 }
>>>> ...
>>>
>>> How is babeltrace showing time-of-day for perf-based data files? Is that
>>> tod when the command is run?
>>
>> CTF needs an a base offset which we set to 0 because we don't have it.
>> It then takes the NS timestamp and computes the "time".
>
> so the perf-clock timestamp is converted to hour-min-second-nsec. That
> is even more confusing - for me at least.
This is the default view of babeltrace. You can switch it off and see
the timestamp in (base + ns).
> By base offset you mean the conversion between perf-clock and realtime?
yes.
> What if that information is known (e.g., my tree at
> https://github.com/dsahern/linux as time-of-day support through a klm) -
> what's the ctf function to set the base offset? Can it be changed as a
> file is processed - e.g., tracepoints capturing ntp adjustments?
Not sure I can follow here. If I'm not mistaken, the perf-clock starts
at 0 at boot time and is then incremented. If you manage to compute the
offset between perf-clock "0" and current-time at-this point then you
can use this as "base". That means, perf-timestamp + base is the
time+date when this event was captured. This base offset isn't stored
in the perf stream.
If you look at ctf_writer__setup_clock() (patch #3) it sets the offset
I refer to. This offset can be set only once and can't be adjusted.
> David
Sebastian
next prev parent reply other threads:[~2014-12-11 20:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 15:12 [PATCHv2 0/8] perf tools: Add perf data CTF conversion Jiri Olsa
2014-12-11 15:12 ` [PATCH 1/8] perf tools: Add feature check for libbabeltrace Jiri Olsa
2014-12-11 15:12 ` [PATCH 2/8] perf tools: Add new perf data command Jiri Olsa
2014-12-11 15:12 ` [PATCH 3/8] perf data: Add perf data to CTF conversion support Jiri Olsa
2014-12-11 17:06 ` David Ahern
2014-12-11 17:15 ` Jiri Olsa
2014-12-11 15:12 ` [PATCH 4/8] perf data: Add a 'perf' prefix to the generic fields Jiri Olsa
2014-12-11 18:55 ` David Ahern
2014-12-11 18:57 ` Sebastian Andrzej Siewior
2014-12-11 19:47 ` David Ahern
2014-12-11 20:22 ` Sebastian Andrzej Siewior [this message]
2014-12-11 15:12 ` [PATCH 5/8] perf data: Add tracepoint events fields CTF conversion support Jiri Olsa
2014-12-11 15:12 ` [PATCH 6/8] perf data: Switch to multiple cpu stream files Jiri Olsa
2014-12-11 15:12 ` [PATCH 7/8] perf data: Enable stream flush within processing Jiri Olsa
2014-12-11 15:12 ` [PATCH 8/8] perf data: Add support for setting ordered_events queue size Jiri Olsa
2014-12-22 15:08 ` [PATCHv2 0/8] perf tools: Add perf data CTF conversion Jiri Olsa
2015-01-08 10:28 ` Jiri Olsa
2015-01-08 13:52 ` Namhyung Kim
2015-01-09 10:38 ` Jiri Olsa
2015-01-08 14:29 ` Peter Zijlstra
2015-01-08 14:38 ` Jiri Olsa
2015-01-09 9:58 ` Peter Zijlstra
2015-01-09 10:03 ` Jiri Olsa
-- strict thread matches above, loose matches on Subject: below --
2015-01-15 16:15 [PATCHv3 " Jiri Olsa
2015-01-15 16:15 ` [PATCH 4/8] perf data: Add a 'perf' prefix to the generic fields Jiri Olsa
2014-12-03 16:23 [PATCH 0/8] perf tools: Add perf data CTF conversion Jiri Olsa
2014-12-03 16:23 ` [PATCH 4/8] perf data: Add a 'perf' prefix to the generic fields Jiri Olsa
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=5489FD23.6000002@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jgalar@efficios.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tzanussi@gmail.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