From: Ingo Molnar <mingo@elte.hu>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Clark Williams <williams@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 tip] perf report: Introduce -u/--unresolved-symbols
Date: Sun, 2 Aug 2009 22:05:33 +0200 [thread overview]
Message-ID: <20090802200533.GG24486@elte.hu> (raw)
In-Reply-To: <20090721201126.GH3091@ghostprotocols.net>
* Arnaldo Carvalho de Melo <acme@redhat.com> wrote:
> So that we can concentrate on getting more symtabs or on figuring out
> which files we have to recompile with -g or ask proprietary vendors for
> graciously ship us rich symtabs.
>
> For instance, shame on me:
>
> [acme@doppio ~]$ perf report -us comm,dso,symbol | head -7
> # Samples: 22501
> #
> # Overhead Command Shared Object Symbol
> # ........ ............ ............................................ ......
> #
> 82.53% npviewer.bin /usr/lib64/mozilla/plugins/libflashplayer.so [.] 0x000000003820d7
> 6.34% skype /opt/skype_static-2.0.0.72/skype [.] 0x00000000e1e0b1
>
> ;-)
>
> But the next cset should be rather nice, as I realized that doing:
>
> yum install /usr/lib/debug/<DSO NAME WITH MISSING SYMTAB>.debug
>
> Works!
>
> Now think about a world where:
>
> yum install /usr/lib/debug/<DSO NAME WITH MISSING SYMTAB>.symtab
>
> Works, makes the internet a better place by not downloading whales,
> oops, debuginfo files full of crap we don't need.
>
> Don't get me wrong, the aforementioned crap has its place in this world,
> just not for the perf tools, _so far_.
>
> Ah, and replace 'yum' with zypper, apt-get (I tried!), smart, urpmi,
> whatever-is-your-still-non-standardized way to get needed pieces to do
> real work.
>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Paul Mackerras <paulus@samba.org>,
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/Documentation/perf-report.txt | 5 +++++
> tools/perf/builtin-report.c | 11 +++++++++--
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
> index e72e931..86aec08 100644
> --- a/tools/perf/Documentation/perf-report.txt
> +++ b/tools/perf/Documentation/perf-report.txt
> @@ -48,6 +48,11 @@ OPTIONS
> all occurances of this separator in symbol names (and other output)
> with a '.' character, that thus it's the only non valid separator.
>
> +-u::
> +--unresolved-symbols
> +
> + Consider only unresolved symbols.
> +
> SEE ALSO
> --------
> linkperf:perf-stat[1]
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index a118bc7..c30f4cd 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -52,6 +52,7 @@ static int modules;
>
> static int full_paths;
> static int show_nr_samples;
> +static int show_only_unresolved_symbols;
>
> static unsigned long page_size;
> static unsigned long mmap_window = 32;
> @@ -1556,8 +1557,12 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
> if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name))
> return 0;
>
> - if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
> - return 0;
> + if (sym) {
> + if (show_only_unresolved_symbols)
> + return 0;
> + if (sym_list && !strlist__has_entry(sym_list, sym->name))
> + return 0;
> + }
>
> if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) {
> eprintf("problem incrementing symbol count, skipping event\n");
> @@ -2020,6 +2025,8 @@ static const struct option options[] = {
> OPT_STRING('t', "field-separator", &field_sep, "separator",
> "separator for columns, no spaces will be added between "
> "columns '.' is reserved."),
> + OPT_BOOLEAN('u', "unresolved-symbols", &show_only_unresolved_symbols,
> + "Show only the symbols that were no resolved to names"),
> OPT_END()
Looks nice!
How about also adding an option to initiate the yum install (or
apt-get, etc.) debuginfo package installation automatically? It
would be a nice 'plug and play' touch.
Ingo
prev parent reply other threads:[~2009-08-02 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 20:11 [PATCH 1/1 tip] perf report: Introduce -u/--unresolved-symbols Arnaldo Carvalho de Melo
2009-07-28 3:10 ` Frederic Weisbecker
2009-08-02 20:05 ` Ingo Molnar [this message]
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=20090802200533.GG24486@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=williams@redhat.com \
/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.