Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

VTune 1.1 Linux. I dont undertand the results

gbernabe
Beginner
572 Views
I want to measure the execution time of an application, where two threads are created, with one physical processor with hyperthreading, that is, two logical processors. I measure the clockticks and I obtain with the command (vtune 1.1 for linux)

>> vtl view -modules -mn prueba -cpu

Event Summary
Clockticks
10440 = Samples collected due to this event
1299014 = Sample after value used during collection
13561706160 = Total events (samples*SAV)

module
event process cpu events
------ ------ ---- ------
prueba prueba
Clockcticks 1 5415589366
Clockcticks 0 2711042218

and with the command

>> vtl view -processes

Event Summary
Clockticks
10440 = Samples collected due to this event
1299014 = Sample after value used during collection
13561706160 = Total events (samples*SAV)

processes
event pid events
------ ------ ------
prueba 1839
Clockcticks 6619775344
prueba 1841
Clockcticks 3934713406

The processor runs at 2 GHz, therefore the execution time by modules is (5.41+2.71)/2=4.06 seconds, while by processes the execution time is (6.61+3.93)/2=5.27 seconds.

However, If I execute
>> time ./prueba

I will obtain
real 0m3.267s
user 0m4.980s
sys 0m0.019s

What is the real execution time? Can someone help me to understand the results?
0 Kudos
1 Reply
jeffrey-gallagher
572 Views
Hey gbernabe,

Great question. In general, keep in mind that VTune's strength is as a profiler: it's a great way to identify the flow of control of your program (callgraph) and to track down hotspots (sampling).

What VTune doesn't do is provide precise counts, and it wasn't intended to. It's sampling methodologies provide statistically significant results, ideal for profiling. It's not a geiger counter clicking precise numbers out.

I found the man page on time pretty interesting reading. Seems to me it's a counter.

I hope this helps.

cheers

jdg
0 Kudos
Reply