All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/function-return-tracer: set a more human readable output
Date: Wed, 26 Nov 2008 03:04:59 +0100	[thread overview]
Message-ID: <20081126020459.GA16374@elte.hu> (raw)
In-Reply-To: <20081126003936.GA26937@elte.hu>


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

> Wow, very nice output! :-)
> 
> I've applied them, will comment and test on them as well.

I kept playing with this for almost an hour and kept looking at pages 
and pages of tracer output - it really shows the kernel's flow in a 
completely different dimension!

Talked to Steve about it and we have a few minor suggestions regarding 
the default output:

I think we should optimize the visual qualities of the output some 
more.

Instead of:

 pick_next_task() {   
   pick_next_task_fair() {   
     wakeup_preempt_entity() { 
     } 301
     set_next_entity() {    
       update_stats_wait_end() { 
       } 281
       __dequeue_entity() { 
       } 319
     } 1990
     hrtick_start_fair() { 
     } 276
   } 4524                                 
 } 5341                 

We should print such traces [mockup]:

   pick_next_task() {                     -
     pick_next_task_fair() {                -
       wakeup_preempt_entity();               + 0.301 us
       set_next_entity() {                    -
         update_stats_wait_end();               + 0.281 us
         __dequeue_entity();                    + 0.319 us
       }                                      + 1.990 us
       hrtick_start_fair();                   + 0.276 us
 +   }                                      + 10.524 us
 ! }                                      + 100.341 us
   switch_mm();                           + 0.494 us

The changes would be:

1) Compression of non-nested calls into a single line.

   Implementing this probably necessiates some trickery with the
   ring-buffer: we'd have to look at the next entry as well and see 
   whether it closes the function call.

2) Adding a closing ';' semicolon to single-line calls. It's the C 
   syntax and i'm missing it :-)

3) The first column: single-character visual shortcuts for "overhead". 
   This is a concept we used in the -rt tracer and it still lives in 
   the latency tracer bits of ftrace and is quite useful:

    '+' means "overhead spike": overhead is above 10 usecs.
    '!' means "large overhead": overhead is above 100 usecs.

   These give at-a-glance hotspot analysis - hotspots are easier to 
   miss as pure numbers.

4) Printing out in units of microseconds, with a decimal point and by
   explicitly mentioning the 'us' unit.

   All of these are important properties: microseconds is still the 
   most common 'overhead' unit in kernel circles. It also gives rather 
   human single-digit or two-digit results. Nanoseconds is three or- 
   four-digit - which is too much. Repeating 'us' so many times is not 
   a problem - these lines will be grepped, quoted, etc - constant 
   reminder about the unit is just fine.

5) Nesting the overhead numbers aligned to the right end of the graph. 
 
   This cleans up the view of the source code printout, but not 
   cluttering it with numbers. It also structures the numbers some 
   more. Visual cues are given via '-' and '+' signs, to follow 
   nesting. This nesting aligns up with the function nesting levels on 
   the left side - so it's easy to pair up number and function name. 
   It also separates the numbers from the symbol length effects in the 
   single-line case. (which is the most common trace line)

What do you think? It's lots of work (sorry! :-), but it would produce 
even more stunning graph-tracer output IMO.

	Ingo

  reply	other threads:[~2008-11-26  2:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 23:57 [PATCH] tracing/function-return-tracer: set a more human readable output Frederic Weisbecker
2008-11-26  0:39 ` Ingo Molnar
2008-11-26  2:04   ` Ingo Molnar [this message]
2008-11-26  2:10     ` [PATCH] tracing: function graph tracer, fix Ingo Molnar
2008-11-26  2:19     ` [PATCH] tracing/function-return-tracer: set a more human readable output Steven Rostedt
2008-11-26 11:32       ` Frédéric Weisbecker
2008-11-26 12:21         ` Steven Rostedt
2008-11-26 13:22           ` Frédéric Weisbecker
2008-11-26 11:11     ` Frédéric Weisbecker
2008-11-26 17:09       ` Steven Rostedt
2008-11-26  2:12   ` Ingo Molnar
2008-11-26 11:11     ` Frédéric Weisbecker
2008-11-26  2:14   ` Ingo Molnar
2008-11-26  2:21     ` Steven Rostedt
2008-11-26  2:42       ` Ingo Molnar
2008-11-26  2:51         ` Steven Rostedt
2008-11-26 11:19     ` Frédéric Weisbecker
2008-11-26 11:38       ` Ingo Molnar

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=20081126020459.GA16374@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 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.