lkml.org 
[lkml]   [2011]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[BUG] perf: perf report -n shows bogus number of samples
From
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.


\
 
 \ /
  Last update: 2011-02-09 00:37    [W:0.038 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site