2

I'm simply trying to get the average time it takes each function to run. That means I want the: "Total time inside the function" / "Number of calls to the function"

I'm getting all sorts of information when I run an analysis from within VTune. These are the settings I'm using:

Basic Hotspot Settings

And also:

Advanced Hotspot Settings

But I can't find where average time is. I can see the Total-Time per function but can't find the call count.

Using Visual Studio 2012, Vtune Amplifier XE 2013, Update 9.

Please help.

ZivS
  • 2,094
  • 2
  • 27
  • 48

1 Answers1

3

1) You have to run "Advanced Hotspots" analysis configured like shown in your second screen-shot. "Basic Hotspots" will NOT provide you with call count information.

2) Once you completed "Advanced Hotspots" - you can find statistical (approximate) call count in Bottom-up View as shown in screen-shot below:

enter image description here

Finally, make sure that you have "Loops and functions" mode selected at the bottom right side of GUI (it's true by default, but who knows what options did you play with).

3) In order to figure out total time and self-time don't forget to make sure you changed "viewpoint" to "Hotspots" (see area highlighed in green in my first screen-shot and also see next picture). enter image description here

4) Starting from 2016 release Parallel Studio has

  • "precise loop call count and trip count"
  • "precise function call count"

measurement tool (as well as total, self and even elapsed time and lots of SIMD-parallelism related analysis) available in "Intel (a ka "vectorization") Advisor", see more info here: enter image description here

zam
  • 1,664
  • 9
  • 16
  • Thanks, I will try it. What do you mean by "actually have RUN..." if I selected it and hit the start button, that mean's I actually have run it, doesn't it? – ZivS Jun 01 '15 at 19:14
  • 1 more thing, I see that you view with "Hardware Event Sample Counts viewpoint".I read here: https://software.intel.com/en-us/articles/calculating-estimated-call-counts-with-intel-vtune-amplifier-xe-2013 that this is what I need but I don't have the Lightweight Hotspot option" and couldn't see the columns they show there either. Could you post how you configured the analyzer prior to starting the analysis please? – ZivS Jun 01 '15 at 19:21
  • Lightweight Hostpots == Advanced Hotspots. You will see the confirmation here: https://software.intel.com/en-us/articles/new-analysis-type-names-basic-hotspots-and-advanced-hotspots – zam Jun 01 '15 at 20:00
  • So my conclusion: you have run appropriate analysis type (Advanced Hotspots) which you've properly configured. But after that you can't find the information in GUI (either because it's not easy to find, or because of bug). In order to understand the reason I changed screen-shot in my answer. May I ask you to make sure you've actually selected appropriate viewpoint (see green highlighting) and switched to Bottom-up (red rectangle)? – zam Jun 01 '15 at 20:07
  • thank you, I'm not sure how is it that I didn't have this column but now I see it! – ZivS Jun 04 '15 at 10:45
  • :) So I got the call count, now I need to figure out how to get the total time the app spent in some function, better yet I have a task (which I call from my code something like itt_begin\end) and I need its total time..can you help me with that maybe as well? – ZivS Jun 05 '15 at 08:47
  • OK, I've updated my answer above with bullet (3) - which should address your total-time question at least for functions (not sure I got your question about itt api). – zam Jun 05 '15 at 14:50