Re: [PATCH] perf: add csv-style output to perf stat

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnaldo Carvalho de Melo
Date: Wednesday, December 1, 2010 - 10:06 am

Em Wed, Dec 01, 2010 at 05:00:05PM +0200, Stephane Eranian escreveu:

I was about to work on this :-) I think we should use the same option
'report' uses:

    OPT_STRING('t', "field-separator", &symbol_conf.field_sep, "separator",
               "separator for columns, no spaces will be added between "
               "columns '.' is reserved."),

[root@mica ~]# perf record -F 100000 ls > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.041 MB perf.data (~1798 samples) ]
[root@mica ~]# perf report --stdio -t, | head -10
# Events: 1K cycles
#
# Overhead,Command,Shared Object,Symbol
52.57,    ls,libc-2.5.so      ,[.] __GI___strcoll_l
3.97,    ls,ls               ,[.]             24a2
3.48,    ls,libc-2.5.so      ,[.] __GI_strlen
2.33,    ls,[ext3]           ,[k] ext3fs_dirhash
2.21,    ls,[kernel.kallsyms],[k] clear_page_c
1.94,    ls,[ext3]           ,[k] ext3_htree_store_dirent
1.81,    ls,[kernel.kallsyms],[k] rt_spin_lock_fastunlock
[root@mica ~]#

Spaces are being added, gack, will fix. Tried to use the same option letter and
long option name as in 'sort':

       -t, --field-separator=SEP
              use SEP instead of non-blank to blank transition

But then 'perf stat' already uses -t for --tid, so in 'stat' we would have to
use '-x'/--field-separator.

Argh, I think we should stop using short options, only assigning something when
it gets from seldomly used to just before making it the default 8-)

- Arnaldo
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] perf: add csv-style output to perf stat, Stephane Eranian, (Wed Dec 1, 8:00 am)
Re: [PATCH] perf: add csv-style output to perf stat, Arnaldo Carvalho de Melo, (Wed Dec 1, 10:06 am)
Re: [PATCH] perf: add csv-style output to perf stat, stephane eranian, (Wed Dec 1, 10:24 am)
Re: [PATCH] perf: add csv-style output to perf stat, Arnaldo Carvalho de Melo, (Wed Dec 1, 10:55 am)