All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Cc: linux-kernel@vger.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH -tip  6/7] perf bts trace: print function+offset
Date: Fri, 03 Dec 2010 14:00:58 +0100	[thread overview]
Message-ID: <1291381258.32004.2083.camel@laptop> (raw)
In-Reply-To: <20101203040015.7827.38870.stgit@localhost6.localdomain6>

On Fri, 2010-12-03 at 13:00 +0900, Akihiro Nagai wrote:
> Provide the function to print function+offset.
> And, set it as the default behavior of 'perf bts trace'.
> To use this function, users can also specify the option '-s' or '--symbol'.
> 
> Example: 'perf bts -as trace'
> This command prints address and function+offset.
> 
> Output sample:
> address            function+offset
> 0xffffffff8146fe0e irq_return+0x0         => 0x00007fd4038e3b20 _start+0x0
> ...
> 0x000000380661ee79 __libc_start_main+0xf9 => 0x00000000004035c3 main+0x0
> 0xffffffff8146ef4e irq_return+0x0         => 0x00000000004035c3 main+0x0
> 0x00000000004035e8 main+0x25              => 0x000000000040bca0 set_program_name+0x0
> 0xffffffff8146ef4e irq_return+0x0         => 0x000000000040bca0 set_program_name+0x0
> 0x000000000040bcae set_program_name+0xe   => 0x00000000004023d0 strrchr@plt+0x0
> 0x00000000004023d0 strrchr@plt+0x0        => 0x00000000004023d6 strrchr@plt+0x6
> ...
> 0x0000000000403e0c main+0x849             => 0x00000000004021f0 exit@plt+0x0
> 0x00000000004021f0 exit@plt+0x0           => 0x00000000004021f6 exit@plt+0x6
> 0x00000000004021fb exit@plt+0xb           => 0x00000000004020d0 _init+0x18
> 0x00000000004020d6 _init+0x1e             => 0x00000038062149d0 _dl_runtime_resolve+0x0


What would be very nice output is something like a source-code browser
(tig might have something worth borrowing) and annotating the output
using the bts output.

You could for example darken the code that didn't get any coverage, and
print a percentage for each conditional statement.

That way you can easily see how your code is traversed.

  reply	other threads:[~2010-12-03 13:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03  3:58 [PATCH -tip 0/7] perf: Introduce bts sub commands Akihiro Nagai
2010-12-03  3:58 ` [PATCH -tip 1/7] perf: add OPT_CALLBACK_DEFAULT_NOOPT Akihiro Nagai
2010-12-06  2:23   ` Masami Hiramatsu
2010-12-07  6:56   ` [tip:perf/core] perf options: " tip-bot for Akihiro Nagai
2010-12-03  3:59 ` [PATCH -tip 2/7] perf: Introduce perf sub command 'bts record' Akihiro Nagai
2010-12-06  2:26   ` Masami Hiramatsu
2010-12-03  3:59 ` [PATCH -tip 3/7] perf bts: Introduce new sub command 'perf bts trace' Akihiro Nagai
2010-12-06  3:10   ` Masami Hiramatsu
2010-12-03  3:59 ` [PATCH -tip 4/7] perf bts trace: print pid and command Akihiro Nagai
2010-12-06  3:16   ` Masami Hiramatsu
2010-12-03  3:59 ` [PATCH -tip 5/7] perf bts trace: print file path of the executed elf Akihiro Nagai
2010-12-06  3:17   ` Masami Hiramatsu
2010-12-03  4:00 ` [PATCH -tip 6/7] perf bts trace: print function+offset Akihiro Nagai
2010-12-03 13:00   ` Peter Zijlstra [this message]
2010-12-06 10:08     ` Akihiro Nagai
2010-12-06  2:42   ` Frederic Weisbecker
2010-12-06 10:28     ` Akihiro Nagai
2010-12-06  3:20   ` Masami Hiramatsu
2010-12-03  4:00 ` [PATCH -tip 7/7] perf bts trace: add print all option Akihiro Nagai
2010-12-06  3:20   ` Masami Hiramatsu

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=1291381258.32004.2083.camel@laptop \
    --to=peterz@infradead.org \
    --cc=acme@ghostprotocols.net \
    --cc=akihiro.nagai.hw@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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.