public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Mike Galbraith <efault@gmx.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
	Clark Williams <williams@redhat.com>,
	Jon Masters <jonathan@jonmasters.org>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Christoph Hellwig <hch@infradead.org>,
	Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Zhaolei <zhaolei@cn.fujitsu.com>, Li Zefan <lizf@cn.fujitsu.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Tom Zanussi <tzanussi@gmail.com>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	Roland McGrath <roland@redhat.com>,
	Jason Baron <jbaron@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Paul Mackerras <paulus@samba.org>,
	Jiaying Zhang <jiayingz@google.com>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH 4/4] perf tools: Add perf trace
Date: Mon, 17 Aug 2009 18:28:09 +0200	[thread overview]
Message-ID: <20090817162807.GA4953@nowhere> (raw)
In-Reply-To: <20090817144007.GC3602@elte.hu>

On Mon, Aug 17, 2009 at 04:40:07PM +0200, Ingo Molnar wrote:
> 
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> 
> > This adds perf trace into the set of perf tools. It is written to 
> > fetch the tracepoints samples from perf events and display them, 
> > according to the events informations given by the debugfs files 
> > through the util/trace* tools.
> > 
> > It is a rough first shot and doesn't yet handle the cpu, 
> > timestamps fields and some other things.
> > 
> > Example:
> > 
> > perf record -f -e workqueue:workqueue_execution:record -F 1 -a
> > perf trace
> > 
> >        kblockd/0-236   [000]     0.000000: workqueue_execution: thread=:236 func=cfq_kick_queue+0x0
> >      kondemand/0-360   [000]     0.000000: workqueue_execution: thread=:360 func=do_dbs_timer+0x0
> >      kondemand/0-360   [000]     0.000000: workqueue_execution: thread=:360 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> >      kondemand/1-361   [000]     0.000000: workqueue_execution: thread=:361 func=do_dbs_timer+0x0
> 
> Nice!
> 
> > Todo:
> > 
> > - A lot of things!
> 
> heh :-)
> 
> To help this move forward i've put the patches into 
> tip:perfcounters/tracing. We might still rebase that branch, should 
> it become necessary, before merging it into perfcounters/core - but 
> it should give a first glimpse to people who want to try this.
> 
> A first bugreport:
> 
> took me some time to figure out that i need to pass in -R to create 
> a trace.info. I think we want to share the namespace anyway - 
> there's no real difference between perf.data and trace.info - both 
> contain trace records.



trace.info only contains the events descriptions and other ftrace things:

- formats, ftrace printk strings, ...

I plan to integrate that into perf.trace so that we have only one file
to move to perform offline analysis.

Concerning the -R thing (or ::record suffix), indeed I have yet to
warn the user from perf trace about that. Todo listed!

> 
> once i added -R i ran into this problem:
> 
> # perf record -R -f -e workqueue:workqueue_execution:record -F 1 -a
> ^C
> [ perf record: Captured and wrote 0.250 MB perf.data (~10928 samples) ]
> 
> aldebaran:/home/mingo/linux/linux/tools/perf> perf trace
>   Fatal: bad op token )


Oh!
Hmm, also I forgot to explain a detail, there is a little bug in ftrace
syscalls formats which reports the format is too big when a syscall takes
no parameter. It needs a trivial fix, I'll send it soon.

Anyway, that made me a very similar Fatal thing but not exactly the same.
Could you send me your config? May be you have tracepoint/ftrace plugins
I haven't built (well I should build all of them actually).


> version = 0.5
> 
> Some missing patch?



Soon :)


> 	Ingo
> --
> 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/


  reply	other threads:[~2009-08-17 16:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 14:18 [PATCH 1/4] perf tools: Add trace event debugfs IO handler Frederic Weisbecker
2009-08-17 14:18 ` [PATCH 2/4] perf tools: Add trace event debugfs stream reader Frederic Weisbecker
2009-08-17 14:42   ` [tip:perfcounters/tracing] " tip-bot for Steven Rostedt
2009-08-17 14:18 ` [PATCH 3/4] perf tools: Add trace event informations parser Frederic Weisbecker
2009-08-17 14:43   ` [tip:perfcounters/tracing] perf tools: Add trace event information parser tip-bot for Steven Rostedt
2009-08-17 14:18 ` [PATCH 4/4] perf tools: Add perf trace Frederic Weisbecker
2009-08-17 14:40   ` Ingo Molnar
2009-08-17 16:28     ` Frederic Weisbecker [this message]
2009-08-17 16:36       ` Ingo Molnar
2009-08-17 21:07     ` [PATCH 1/4] perf tools: Fix spelling mistake in callchain error Frederic Weisbecker
2009-08-17 22:06       ` [tip:perfcounters/tracing] " tip-bot for Frederic Weisbecker
2009-08-17 21:07     ` [PATCH 2/4] perf tools: Warn while running perf trace without sample Frederic Weisbecker
2009-08-17 22:06       ` [tip:perfcounters/tracing] " tip-bot for Frederic Weisbecker
2009-08-17 21:07     ` [PATCH 3/4] perf tools: Record events info also when :record suffix is used Frederic Weisbecker
2009-08-17 22:06       ` [tip:perfcounters/tracing] " tip-bot for Frederic Weisbecker
2009-08-17 21:07     ` [PATCH 4/4] perf tools: Make trace event format parser aware of cast to pointers Frederic Weisbecker
2009-08-17 22:06       ` [tip:perfcounters/tracing] " tip-bot for Frederic Weisbecker
2009-08-17 14:43   ` [tip:perfcounters/tracing] perf tools: Add perf trace tip-bot for Frederic Weisbecker
2009-08-17 14:42 ` [tip:perfcounters/tracing] perf tools: Add trace event debugfs IO handler tip-bot for Steven Rostedt

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=20090817162807.GA4953@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=anton@samba.org \
    --cc=efault@gmx.de \
    --cc=fche@redhat.com \
    --cc=hch@infradead.org \
    --cc=jbaron@redhat.com \
    --cc=jiayingz@google.com \
    --cc=jonathan@jonmasters.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=lclaudio@uudg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tzanussi@gmail.com \
    --cc=williams@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.com \
    --cc=zhaolei@cn.fujitsu.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