public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Human readable output for function return tracer
@ 2008-11-24 14:39 Frédéric Weisbecker
  2008-11-24 16:27 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Frédéric Weisbecker @ 2008-11-24 14:39 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt; +Cc: Linux Kernel

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).

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

Oh and we have the parent in a return trace, so we would actually have:

func2->func3
func1->func4
....    ->func1

This trace flow doesn't make the things easy to produce our C like code.

So I found only one solution which have both pros and cons.
I could send a "pre-trace" to the ring-buffer to signal that function
x with depth y is beeing called
(when we enter the function).

The pros:

_ It will be easy to draw our C 'like trace, without any special
pre-output work.
_ The name could be definetly full-function-tracer with this new pre-trace :-)
_ Automatic trace parsing, tree of calls building will be more easy....

The cons:

_ The function-return-tracer slows down the system.
   It will be worst with a new insertion in the ring-buffer. But if it is mostly
   used with dynamic ftrace and a good set of filtered functions, I
don't think that will be
   an issue.

If you think about an other solution, don't hesitate to tell me :-)
Thanks....

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-11-25 16:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox