* binary ftrace buffer format
@ 2009-07-13 21:23 Johannes Berg
2009-07-14 17:22 ` Johannes Berg
2009-07-21 1:51 ` Steven Rostedt
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2009-07-13 21:23 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Frederic Weisbecker, Steven Rostedt
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
Hi!
For the past hour or so I've been trying to make Steven's rb-read.pl
script [1] work, but not only is it endian-challenged, working only on
LE, but also does it seems to have a different idea of the ring buffer
format, so even with fixes I can't get it to print proper data.
I'm convinced that it would be trivial to write a program to parse the
binary trace buffer, but I can't find a format description. Can somebody
point me to one please?
Oh and a tangential question -- that thing seems to work on pages, does
that mean I can't trace something larger than a page?
johannes
[1] http://lwn.net/Articles/321777/
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: binary ftrace buffer format
2009-07-13 21:23 binary ftrace buffer format Johannes Berg
@ 2009-07-14 17:22 ` Johannes Berg
2009-07-21 1:51 ` Steven Rostedt
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2009-07-14 17:22 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Frederic Weisbecker, Steven Rostedt
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
So, I've gotten this far, manually:
This was on a powerpc 64-bit (big endian) machine, the contents of
per_cpu/trace_pipe_raw:
00000000 00 00 02 24 15 cd b4 a0 00 00 00 00 00 00 0f f0 page header: time 2354.007880864, 4080 bytes
00000010 00 00 00 00 item header: type_len == 0, time offset = 0
00 00 00 94 item length: 148 bytes
00 82 event ID 130
11 02 00 00 00 00
00000020 00 00 00 00 00 00 00 00 c0 00 00 01 03 ca 1a 00
00000030 00 1a 70 00 00 00 01 00 00 80 39 e4 01 00 00 00
00000040 00 00 00 00 00 00 01 09 01 00 7c 10 80 00 ec 0f
00000050 80 00 00 00 00 00 01 00 00 00 ff ff ff ff 1a ff
00000060 ff ff 02 ff ff ff 20 34 00 00 e2 34 00 00 c4 ca
00000070 ff ff 94 c9 ff ff 66 f3 ff ff e6 f2 ff ff 00 00
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000090 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff
000000a0 ff ff 00 00
00 00 00 00 item header: type_len == 0, time offset == 0
88 78 3d 40 item length???
00 82 event ID 130
11 02
at which point it stops making sense. What's with that item length? Can
anyone help?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: binary ftrace buffer format
2009-07-13 21:23 binary ftrace buffer format Johannes Berg
2009-07-14 17:22 ` Johannes Berg
@ 2009-07-21 1:51 ` Steven Rostedt
2009-07-21 10:46 ` Johannes Berg
2009-07-22 11:36 ` Johannes Berg
1 sibling, 2 replies; 6+ messages in thread
From: Steven Rostedt @ 2009-07-21 1:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: LKML, Ingo Molnar, Frederic Weisbecker
On Mon, 13 Jul 2009, Johannes Berg wrote:
> Hi!
>
> For the past hour or so I've been trying to make Steven's rb-read.pl
> script [1] work, but not only is it endian-challenged, working only on
> LE, but also does it seems to have a different idea of the ring buffer
> format, so even with fixes I can't get it to print proper data.
>
> I'm convinced that it would be trivial to write a program to parse the
> binary trace buffer, but I can't find a format description. Can somebody
> point me to one please?
I have a tool called trace-cmd (I'm looking into porting it to the perf
tool) but it currently does what you want. I've tested it on both 32 bit
and 64 bit systems as well as big and little endians. The files can be
created on one system and read on another. It contains data in the files
to let other systems know how to read it.
You can get the tool here:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
>
> Oh and a tangential question -- that thing seems to work on pages, does
> that mean I can't trace something larger than a page?
Currently, we have not the need to trace more than a page. But this is
something that can be changed in the future, but currently we have not had
the need, and when it was developed, Linus suggested pages would be fine.
-- Steve
>
> johannes
>
> [1] http://lwn.net/Articles/321777/
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: binary ftrace buffer format
2009-07-21 1:51 ` Steven Rostedt
@ 2009-07-21 10:46 ` Johannes Berg
2009-07-22 11:36 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2009-07-21 10:46 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, Ingo Molnar, Frederic Weisbecker
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
On Mon, 2009-07-20 at 21:51 -0400, Steven Rostedt wrote:
> I have a tool called trace-cmd (I'm looking into porting it to the perf
> tool) but it currently does what you want. I've tested it on both 32 bit
> and 64 bit systems as well as big and little endians. The files can be
> created on one system and read on another. It contains data in the files
> to let other systems know how to read it.
>
> You can get the tool here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
Nice! I'll give it a whirl, in the meantime I've already found the
problem I was looking for though.
> Currently, we have not the need to trace more than a page. But this is
> something that can be changed in the future, but currently we have not had
> the need, and when it was developed, Linus suggested pages would be fine.
Fair enough.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: binary ftrace buffer format
2009-07-21 1:51 ` Steven Rostedt
2009-07-21 10:46 ` Johannes Berg
@ 2009-07-22 11:36 ` Johannes Berg
2009-07-22 15:17 ` Steven Rostedt
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-07-22 11:36 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, Ingo Molnar, Frederic Weisbecker
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
On Mon, 2009-07-20 at 21:51 -0400, Steven Rostedt wrote:
> You can get the tool here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
Another thing that just crossed my mind -- is this a candidate for
tools/ maybe?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: binary ftrace buffer format
2009-07-22 11:36 ` Johannes Berg
@ 2009-07-22 15:17 ` Steven Rostedt
0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2009-07-22 15:17 UTC (permalink / raw)
To: Johannes Berg; +Cc: LKML, Ingo Molnar, Frederic Weisbecker
On Wed, 22 Jul 2009, Johannes Berg wrote:
> On Mon, 2009-07-20 at 21:51 -0400, Steven Rostedt wrote:
>
> > You can get the tool here:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
>
> Another thing that just crossed my mind -- is this a candidate for
> tools/ maybe?
Actually, I'm looking at putting this into perf. That way we have one tool
with one format. I'll have to work with Ingo to see exactly how this
should be done.
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-22 15:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 21:23 binary ftrace buffer format Johannes Berg
2009-07-14 17:22 ` Johannes Berg
2009-07-21 1:51 ` Steven Rostedt
2009-07-21 10:46 ` Johannes Berg
2009-07-22 11:36 ` Johannes Berg
2009-07-22 15:17 ` Steven Rostedt
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®