All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Human readable output for function return tracer
Date: Mon, 24 Nov 2008 16:15:15 -0200	[thread overview]
Message-ID: <20081124181515.GG26466@ghostprotocols.net> (raw)
In-Reply-To: <c62985530811240639w574659c0nd0a54e6c1fb1197a@mail.gmail.com>

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

  parent reply	other threads:[~2008-11-24 18:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 14:39 Human readable output for function return tracer Frédéric Weisbecker
2008-11-24 16:27 ` Ingo Molnar
2008-11-24 17:16   ` Frédéric Weisbecker
2008-11-25 15:18   ` Frédéric Weisbecker
2008-11-25 15:36     ` Ingo Molnar
2008-11-25 15:40       ` Ingo Molnar
2008-11-25 15:49         ` Frédéric Weisbecker
2008-11-25 15:56         ` Ingo Molnar
2008-11-25 16:01           ` Frédéric Weisbecker
2008-11-24 17:21 ` Steven Rostedt
2008-11-24 17:34   ` Frédéric Weisbecker
2008-11-24 18:15 ` Arnaldo Carvalho de Melo [this message]
2008-11-24 19:10   ` Frédéric Weisbecker
2008-11-24 19:39     ` Arnaldo Carvalho de Melo
2008-11-24 20:00       ` Frédéric Weisbecker
2008-11-24 20:13       ` Frédéric Weisbecker

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=20081124181515.GG26466@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.