Skip to contentSkip to conversation

perf record + perf report

DISCUSSION Etem 2 participants 2 messages Jul 29, 2013 – Aug 2, 2013

lore
Share & tools
lore

Etem

author
#0 lore raw

I am running Ubuntu 11.10 64bit on x86_64 machine with 4 core and hyperthreading enabled. I am using the following commands in order to get per-thread performance characteristics of a multi-threaded application. "perf record -s -e cycles,instructions,cache-references,cache- misses,branches,branch-misses /PATH/TO/APPLICATION". "perf report -T -- stdio".

I get invalid results randomly. In the result, I get invalid (negative) process id or very big counter values. I am giving an example output:

# (For a higher level overview, try: perf report --sort comm,dso) #
# PID TID cycles cycles instructions instructions
instructions instructions instructions instructions
instructions instructions cache-references cache-references
cache-references cache-references cache-references
cache-references cache-references cache-references cache-misses
cache-misses cache-misses cache-misses cache-misses
cache-misses cache-misses cache-misses branches branches
branches branches branches branches
branches branches branch-misses branch-misses
branch-misses branch-misses branch-misses branch-misses
branch-misses branch-misses cycles cycles
cycles cycles cycles cycles
4487 4493 0 0 0 0
7494102348578251111 3488601301391995001 41541
37571 0 0 0 0
7092150592960751218 7810209763779608678 1611
2111 0 7381246349212319846 0 0
7018136542324422001 28838465189274226 36
28 0 0 0 0
8026367814273625705 7453295080785733747 7380943991784800358
7228 0 0 0 0
28825271049347427 28825292623798627 28825270915195235
434 0 0 0 0
8462108034846451316 85567 94053 98435
...

You can see invalid values such as 8026367814273625705. How can I fix this problem and get correct per-thread performance counters?

Thanks.

#1 lore raw
Quoted 6 lines · Etem

I am running Ubuntu 11.10 64bit on x86_64 machine with 4 core and hyperthreading enabled. I am using the following commands in order to get per-thread performance characteristics of a multi-threaded application. "perf record -s -e cycles,instructions,cache-references,cache- misses,branches,branch-misses /PATH/TO/APPLICATION". "perf report -T -- stdio".

AFAIK per thread display mode has been broken for a long time.

Best you file a bug on http://bugzilla.kernel.org on perf.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only