Hi everybody,

I'm using oprofile to profile an application, but i'm running through some issues i'd like to post here in case anyone can help me. The fact is that oprofile does not seem to give me correct reports

This is what i do

rm tmpfile; for i in `seq 3`; do opcontrol --shutdown; opcontrol --init; opcontrol --start ; opcontrol --reset; time ./blastp -query /home/perencia/Secuencias/tremblr/selected/1000_30 -db /home/perencia/Secuencias/swissprot -num_threads 2; opcontrol --stop; opreport >> tmpfile; done; cat tmpfile | grep blastp;

So the application that i'm running is blastp, a multithreaded application, in this case with 2 threads.
opcontrol --status gives me that

Daemon running: pid 11694
Event 0: CPU_CLK_UNHALTED:100000:0:1:1
Separate options: none
vmlinux file: none
Image filter: none
Call-graph depth: 6
Buffer size: 65536

So, after running the application in the loop i get this times from the time command..

real 0m5.293s

user 0m10.225s

sys 0m0.056s

real 0m5.277s

user 0m10.117s

sys 0m0.060s

real 0m5.210s

user 0m10.045s

sys 0m0.056s

but oprofile reports this cycles 

 277513 93.6010 blastp

 167677 90.9287 blastp

 164675 91.5181 blastp

The machine has a 2.66 GHz processor, so the first result, (277513/2 threads) * 100000 / (2.66 * 10^9) = 5.21 seconds, seems accurate. But what about the other two ? Doing the calculations they report 3 seconds, not the 5 seconds reported by time.

Am i missing something ?