lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Feb 2011 00:34:44 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, mingo@...e.hu,
	Peter Zijlstra <peterz@...radead.org>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	perfmon2-devel@...ts.sf.net
Subject: [BUG] perf: perf report -n shows bogus number of samples

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ