public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] perf: perf report -n shows bogus number of samples
@ 2011-02-08 23:34 Stephane Eranian
  2011-02-17 15:23 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Eranian @ 2011-02-08 23:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: LKML, mingo, Peter Zijlstra, Frédéric Weisbecker,
	perfmon2-devel

Arnaldo,

I think the -n option of perf report shows bogus number of samples.

I believe it does not print the number of samples but rather the
number of events if I understand the code in hist_entry__snprintf().
I think that's useless, the number of samples is more useful.

$ perf report -h

 usage: perf report [<options>] <command>

    -i, --input <file>    input file name
    -v, --verbose         be more verbose (show symbol address, etc)
    -D, --dump-raw-trace  dump raw trace in ASCII
    -k, --vmlinux <file>  vmlinux pathname
        --kallsyms <file>
                          kallsyms pathname
    -f, --force           don't complain, do it
    -m, --modules         load module symbols - WARNING: use only with
-k and LIVE kernel
    -n, --show-nr-samples
                          Show a column with the number of samples

$ perf record -e cycles ./repmov
$ perf report -D | fgrep RECORD_SAMPLE | wc -l
86346
$ ./perf report -n
# Events: 86K cycles
#
# Overhead  Samples    Command      Shared Object                     Symbol
# ........ ..........  .......  .................  .........................
#
    98.92%238206388334   repmov  repmov             [.] main
     0.08%  189506224   repmov  [kernel.kallsyms]  [k] perf_ctx_adjust_freq
     0.06%  147582706   repmov  [kernel.kallsyms]  [k] perf_event_task_tick

It should be easy to reproduce with any other program.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-17 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 23:34 [BUG] perf: perf report -n shows bogus number of samples Stephane Eranian
2011-02-17 15:23 ` Arnaldo Carvalho de Melo
2011-02-17 18:19   ` Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox