public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers
Date: Thu, 13 Nov 2008 10:14:54 +0100	[thread overview]
Message-ID: <20081113091454.GH25479@elte.hu> (raw)
In-Reply-To: <20081113085949.GG25479@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> Or perhaps we could name it the "callgraph" tracer? (as opposed to 
> the simpler function tracer which traces function entries) Note that 
> we could use the output to build function call coverage graphs.
> 
> It definitely must convey the idea that this is a more capable (and 
> also more expensive) form of function tracing.

on a related note.

Frederic, it would be nice to fine-tune the tracer output to convey 
the callgraph information more clearly. Here's a mockup of a good 
default output:

  getnstimeofday() {
   set_normalized_timespec() {
    clocksource_read() {
     acpi_pm_read()                     ( 1547 ns)
    } clocksource_read()                ( 1951 ns)
   } set_normalized_timespec()          ( 2200 ns)
  } getnstimeofday()                    ( 2354 ns)

  [...]

Such output would be _very_ nice and intuitive to have. Developers 
would love it instantly. Note its C-ish syntax - that is obviously the 
easiest to parse for kernel developers.

and note how natural it will be in the future to embellish certain 
function calls in the above trace, for example with function 
arguments:

    clocksource_read("acpi_pm") {

i'd suggest to hide the offset bit of the ksym (like the mockup does 
it - unless a tracing_option is set for more verbose symbol output). 
For these traces it's almost always useless and the context tells us 
in 99% of the cases where a function got called.

Easiest would be to add a depth field to the trace entry as well, to 
make sure we get the right depth in the end, even if we somehow mix up 
the trace entries.

We could also trace function entry and exit separately, and 
post-process the call stack (and the cost) during trace output 
formatting - not during tracing.

Hm?

	Ingo

  reply	other threads:[~2008-11-13  9:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 21:49 [PATCH 2/2] tracing/function-return-tracer: Call prepare_ftrace_return by registers Frederic Weisbecker
2008-11-12 22:16 ` Ingo Molnar
2008-11-12 22:22   ` Frédéric Weisbecker
2008-11-12 23:25     ` Steven Rostedt
2008-11-12 23:35       ` Frédéric Weisbecker
2008-11-13  0:11         ` Steven Rostedt
2008-11-13  8:59           ` Ingo Molnar
2008-11-13  9:14             ` Ingo Molnar [this message]
2008-11-13 10:02               ` Frédéric Weisbecker
2008-11-13 10:09                 ` Ingo Molnar
2008-11-13 23:48                   ` Frédéric Weisbecker
2008-11-13  9:38             ` Frédéric Weisbecker
2008-11-13  9:40               ` Frédéric Weisbecker
2008-11-13  9:44               ` Ingo Molnar
2008-11-17 18:58                 ` Frederic 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=20081113091454.GH25479@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox