public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 tip] perf report: Adjust column width to the values sampled
Date: Fri, 10 Jul 2009 06:01:04 +0200	[thread overview]
Message-ID: <20090710040104.GB5077@elte.hu> (raw)
In-Reply-To: <20090706192157.GA3320@ghostprotocols.net>


* Arnaldo Carvalho de Melo <acme@redhat.com> wrote:

> Example:
> 
> [acme@doppio pahole]$  perf report --sort comm,dso,symbol | head -13
> 
>     12.79%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_find_attr
>      8.90%   pahole  /lib64/libc-2.10.1.so        [.] _int_malloc
>      8.68%   pahole  /usr/lib64/libdw-0.141.so    [.] __libdw_form_val_len
>      8.15%   pahole  /lib64/libc-2.10.1.so        [.] __GI_strcmp
>      6.80%   pahole  /lib64/libc-2.10.1.so        [.] __tsearch
>      5.54%   pahole  ./build/libdwarves.so.1.0.0  [.] tag__recode_dwarf_type
> [acme@doppio pahole]$
> 
> [acme@doppio pahole]$  perf report --sort comm,dso,symbol -d /lib64/libc-2.10.1.so | head -10
> 
>     21.92%   pahole  /lib64/libc-2.10.1.so  [.] _int_malloc
>     20.08%   pahole  /lib64/libc-2.10.1.so  [.] __GI_strcmp
>     16.75%   pahole  /lib64/libc-2.10.1.so  [.] __tsearch
> [acme@doppio pahole]$
> 
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Suggested-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/builtin-report.c            |   93 ++++++++++++++++++++++++--------
>  tools/perf/util/include/linux/kernel.h |    8 +++
>  tools/perf/util/symbol.c               |    1 +
>  tools/perf/util/symbol.h               |    1 +
>  4 files changed, 80 insertions(+), 23 deletions(-)

Ok, that's certainly a nice feature.

The only worry is that this makes it harder to post-process the 
output via scripts. Mind eliminating this worry and completing this 
patch by adding two other variants of this as well:

  -w, --field-width=<COLS>

  Force column width to <COLS>, for large terminal readability.

  ( Optional: perhaps also allow for special syntax -w 10,20,10 for
    separate width for separate columns. )

  -t, --field-separator=<SEP>

  Use special separator character <SEP> and dont pad with spaces, 
  and replace all occurances of '<SEP>' in symbol names (and other 
  output) with a '.' character.

  This is for easier output parsing for scripts.

	Ingo

  reply	other threads:[~2009-07-10  4:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 19:21 [PATCH 1/1 tip] perf report: Adjust column width to the values sampled Arnaldo Carvalho de Melo
2009-07-10  4:01 ` Ingo Molnar [this message]
2009-07-11  1:47   ` Arnaldo Carvalho de Melo
2009-07-11  8:25     ` Ingo Molnar
2009-07-11  8:30     ` [tip:perfcounters/core] " tip-bot for Arnaldo Carvalho de Melo

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=20090710040104.GB5077@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 \
    /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