I've written the test to run bad_perfo first, and then good_perfo and now only
bad_perfo is in the report :
$ perf record -e cycles,instructions -o perf.data.cycles.instructions2
./test_perfo2
$ perf report -i perf.data.cycles.instructions2 --stdio
# Events: 8K cycles
#
# Overhead Command Shared Object Symbol
# ........ ....... ................. .........................
#
99.52% test_perfo2 test_perfo2 [.] bad_perfo
0.06% test_perfo2 [kernel.kallsyms] [k] copy_page_c
0.05% test_perfo2 [kernel.kallsyms] [k] apic_timer_interrupt
0.04% test_perfo2 [kernel.kallsyms] [k] run_timer_softirq
# Events: 8K instructions
#
# Overhead Command Shared Object Symbol
# ........ ....... ................. .......................
#
99.82% test_perfo2 test_perfo2 [.] bad_perfo
0.04% test_perfo2 ld-2.12.so [.] _dl_lookup_symbol_x
0.01% test_perfo2 [kernel.kallsyms] [k] clear_page_c
0.01% test_perfo2 [kernel.kallsyms] [k] update_wall_time
Michel Hummel
THALES SERVICES SSE/DSC
Tél : +33 (0)5 62 88 76 29
Parc technologique du Canal - 3 avenue de l'Europe – Campus 2 Bât.D • 31400
Toulouse • France www.thalesgroup.com
-----Message d'origine-----
De : Michael Ellerman [mailto:[email protected]]
Envoyé : jeudi 24 mai 2012 02:33
À : HUMMEL Michel
Cc : [email protected]
Objet : Re: Perf 2.6.32-220.el6.x86_64 problem when recording 2 counters
On Wed, 2012-05-23 at 18:06 +0200, HUMMEL Michel wrote:
> Hello,
> I am testing the perf command of my new centos 6.2 server, and I don't
> understand something.
>
> I wrote a simple test case which is calling two functions.
> The first one "good_perfo" does the same as the second "bad_perfo"
> but more efficiently (lesser cache miss ...).
Does it make any difference if you rewrite your test to run bad_perfo
first, and then good_perfo?
cheers