Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sachin_d
Beginner
106 Views

Profiling for Cycle count

Hi All,
1) I am inlining the function and I want to profile it in VTune. Is it possible to profile the function from one point to other in terms of Cycle count?
2) Is is possible to get the Min, Max and Avg cycle count in VTune?
Please let me know.
Thanks and Regards
Sachin Deshpande
0 Kudos
3 Replies
David_A_Intel1
Employee
106 Views

If you inline the function, as you know, the code becomes part of the function containing the reference to the inlined function. If you want info on the performance of the function by itself, don't inline it. If you want performance data of the function when it is inlined, drill down to the source level and look at the disassembly (or Mixed) view and locate the instructions that make up the inlined functions. Then, you can see performance data associated with those instructions.
For Min,Max, Average timing information, you would need to use Call Graph and not Sampling. However, this is going to affect performance because of the overhead of Call Graph instrumentation. That is, sometimes the added calls to the Call Graph collection code will affect caching, etc.
As far as Sampling goes, however, you cannot get those statistics from one run. The analyzer periodically samples where the processor is executing and adds them to bins. So, it doesn't count each time through a loop.
Regards,
sachin_d
Beginner
106 Views

Thanks Dave for the Reply.
Yes I am doing the call graph profling but I am not getting the Min and Max cycle count for function. I getthe Avg self time for the function. Is there a way to get the Min and Max self time take by the function.
Regarding the inlining of the function and profling from onepoint to othere I want to measure the advantage of inlining the function i.e. How much advantage I am getting in performance by reducing the calling oveheads.
David_A_Intel1
Employee
106 Views

Sorry for the delay. I thought I had replied to this topic.
Regarding the performance difference of inlining versus not inlining, the simplest solution is to measure the wall-clock time of the app with and without inlining! Ultimately, the question is, did the application run faster?!
If you really want to use call graph, simply lookat "Total Time" for the function that calls the function that was inlined. If the time decreased significantly when the called function was inlined, then it was a good choice. If not, then it may not make that much difference. Remember, however, that call graph numbers are not "gospel". That is, there is some variation and you should not look at the times as absolute values.
Regarding Max and Min, yeah, sorry. There is no way to get that info. Call graph accumulates the time for each function and does not keep track of individual call times.
Reply