[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081124181515.GG26466@ghostprotocols.net>
Date: Mon, 24 Nov 2008 16:15:15 -0200
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Frédéric Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: Human readable output for function return tracer
Em Mon, Nov 24, 2008 at 03:39:45PM +0100, Frédéric Weisbecker escreveu:
> Hi,
>
> I'm planning to apply an idea proposed by Ingo to make the output on
> the function return tracer
> more "eyes-parsable".
> The idea consists on a trace which has flow similar to C code:
>
> func1() {
> func2() {
> func3() {
> }
> }
> func4() {
> }
> }
>
> (With time of execution added on closing braces).
I do something like that in my ctracer tool[1], take a look at one of
the callgraphs:
http://oops.ghostprotocols.net:81/ostra/dccp/tx/
To save space I the above sequence is represented as:
func1() {
func2() {
func3() 1us
} 5us
func4() 5us
} 12us
I.e. the leaf functions doesn't use {}
> The problem is that the traces arrive in the reverse order, according
> to the fact that functions
> are traced on return.
> The order corresponding to the above example would be as the following:
>
> func3, func2, func4, func1
On ctracer I didn't had this problem as I don't trace all functions,
just the ones that receive as one of its parameters a pointer to the
desired struct, and this pointer is present in all the trace buffer
entries, so as part of postprocessing it separates the callgraphs per
object.
- Arnaldo
[1] git://git.kernel.org/pub/scm/linux/kernel/git/acme/pahole.git
http://git.kernel.org/?p=linux/kernel/git/acme/pahole.git;a=blob_plain;f=README.ctracer
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists