- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
>> 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?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page