Re: [PATCH 1/5] perf stat: add perf stat -B to pretty print largenumbers

From: Ingo Molnar
Date: Wed May 19 2010 - 02:28:59 EST



* Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxx> wrote:

> From: Stephane Eranian <eranian@xxxxxxxxxx>
>
> It is hard to read very large numbers so provide an
> option to perf stat to separate thousands using a
> separator. The patch leverages the locale support of
> stdio. You need to set your LC_NUMERIC appropriately,
> for instance LC_NUMERIC=en_US.UTF8. You need to pass -B
> to activate this feature. This way existing scripts
> parsing the output do not need to be changed. Here is an
> example.

I've pulled it, but IMO we should go one step further:
this feature should be made unconditional. The current
numbers displayed by perf stat are often human-unreadable.

scripts should not parse pretty-printed output.

We used to have something like that, in the form of:

perf record --no-samples --stat -e cycles -e instructions -a sleep 1
perf report -n -t :

But the Newt changes broke this stat-only recording mode.
Furthermore, there should be a --raw kind out output mode
for perf stat as well.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/