public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	eranian@google.com, jolsa@kernel.org, rostedt@goodmis.org,
	adrian.hunter@intel.com, mathieu.desnoyers@efficios.com,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	vincent.weaver@maine.edu
Subject: Re: perf.data file format specification draft
Date: Mon, 18 May 2015 13:21:33 +0900	[thread overview]
Message-ID: <20150518042133.GB21663@sejong> (raw)
In-Reply-To: <20150514131129.GE23588@kernel.org>

Hi Arnaldo and Andi,

On Thu, May 14, 2015 at 10:11:29AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, May 14, 2015 at 02:25:17PM +0200, Andi Kleen escreveu:
> > Hi,
> > 
> > Since there are more and more consumers I started a description of the
> > on-disk perf.data format. This does not replace the kernel perf event
> > description or the manpage, but describes the parts that perf record
> > adds.
> > 
> > So far it is still has some gaps and needs review. Eventually this should
> > become part of the perf documentation.
> > 
> > Steven, would be good if you could fill in some details on how trace
> > data works. 
> 
> I guess that would be Frédéric, and also I think this is a good
> opportunity to remove some stuff that seem to be collected but unused,
> namely a kallsyms copy and maybe something else.

Let me try to describe.  The tracing_data_get() does the work and it
records the following for HEADER_TRACING_DATA in order:

 * tracing header data
   - file magic bytes (including someone's birthday :) )
   - file version (it's 0.5 - the only thing I can see in diff with trace-cmd
     (version 6) is "saved-cmdline" file data which is unnecessary for perf
   - byte order, size of long and page size of the system

 * tracing header files
   - $tracefs/events/header_page and $tracefs/events/header_event
   - describe ftrace raw buffer format which is unnecessary for perf unless
     it reads the raw buffer directly (like my ftrace integration work?)

 * ftrace event files
   - format file for each event in $tracefs/events/ftrace directory
   - this is same as below but precedes other events, not sure why it's needed

 * (normal) event files
   - format file for each tracepoint event

 * /proc/kallsyms
   - for kernel symbol resolution, unnecessary for perf

 * tracing printk formats
   - for trace_printk?  unnecessary for perf

The last two can go away at least.

Thanks,
Namhyung


> 
> > Adrian, would be good if you could fill in the missing bits for
> > auxtrace/itrace.
> > Everyone else, please review and add missing information.
> 
> Thanks for doing this work!
> 
> IIRC there is a presentation written by Jiri where parts of this is
> documented, lemme try to find it...
> 
> - Arnaldo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2015-05-18  4:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 12:25 perf.data file format specification draft Andi Kleen
2015-05-14 13:11 ` Arnaldo Carvalho de Melo
2015-05-14 13:13   ` Arnaldo Carvalho de Melo
2015-05-18  4:21   ` Namhyung Kim [this message]
2015-05-18 16:00     ` Arnaldo Carvalho de Melo
2015-05-15  8:22 ` Stephane Eranian
2015-05-15 12:06   ` Steven Rostedt
2015-05-15 13:19     ` Andi Kleen
2015-05-15 13:34       ` Steven Rostedt
2015-05-15 13:18   ` Andi Kleen

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=20150518042133.GB21663@sejong \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.weaver@maine.edu \
    /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