Vtune Sampling Results from Different Compilers..

Vtune Sampling Results from Different Compilers..

I am trying to profile an application built using ICC and compare it with the results of the application built with GCC to try to determine why the ICC performs better on most data but not all. I am using the same linker for both compiles and builds, but when I run Vtune on both executables to get functional hotspot data there is very little overlap in the function calls. So, I am unable to determine which functions are more difficult for ICC to optimize.

Am I probably doing something wrong, or is this not a way in which Vtune was intended to be used?


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hey reid_g,

I don't see a foul in your VTune use so far: but I don't really understand your experiment yet either. It's true, VTune provides a statistically relevant perspective of what's happening in your code, it never actually counts events like a geiger counter would keep track precisely, tick tick tick. There are a lot of reasons why your results may be statistically less valid than they could be; but that's jumping ahead. Consider:

1) does VTune find the same hotspots everytime for the binary that you used icc on? The same hotspots everytime with gcc? Or does it vary from compile to compile? Or from vtune run to vtune run?

2) Do you see a difference whether you enable or disable the "calibration run" on a sampling session, either/both compilers?

3) How long does your application take to run? Seconds? Milliseconds? Hours?

4) Have you tried different sets of sampling events? Or are you pretty much sticking to the basics, like clockticks and instructions retired? If you're experimenting between various sampling events, do you notice a pattern?

5) Is it your presumption that the different compilers should be showing the same hotspots? I'm not sure that's a logical conclusion since both could have very different optimizing routines and therefore, could be radically different; but I was curious about what you expected to see as you started your optimizing experiment.

6) Have you considered posting your compiler options to the Intel compiler forum, to make sure you're getting an apples to apples comparison between icc and gcc compile options?

All thought welcomed.



If you are using C++ STL functions, the function names from the Dinkumware STL will not match those from any version of libstdc++. If you are using any of the in-lining/ipo options, the view in Vtune will differ greatly between gcc and icc. You would have to avoid the -O3 and -ip.. options to prevent this. Depending on your situation, that may or may not interfere with your purpose.

Leave a Comment

Please sign in to add a comment. Not a member? Join today