Remember that CPU_UNHALTED_CYCLES will not count cycles when the CPU is in halt state (idle). The difference between the computed time and the elapsed time should correspond to the time the CPU was halted (assuming you have one CPU only). if you divide the time you computed by 2 minutes you should get the average CPU utilization during the experiment. You can check if this number matches the CPU utilization reported by top. If not then you might be loosing samples or something else might be wrong
I hope this helps

From: [] On Behalf Of john bryant
Sent: Tuesday, April 01, 2008 1:00 PM
Subject: oprofile samples

Hi all,

I have collected system samples using oprofile for period of 2 minutes. My system is pentium 4, 2GHz. For events like CPU UNHALTED CYCLES, I used a event count as 10,000.  No of samples i gathered during 2 minutes execution is x. Hence, total cycles consumed in this profiling is 10,000*x

once cycle in my system takes (1/2Ghz) second

So, total time should be 10,000 *x * (1/2Ghz) second. Unfortunately, I am not getting 2 minutes as execution time. Am i doing anything wrong

Thanks in advance