Overhead and Spin Time Issue in Intel® Threading Building Blocks Applications Due to Inlining

Published:10/28/2014   Last Updated:10/28/2014

Intel® Threading Building Blocks (Intel TBB) applications may have an incorrectly high amount of Overhead or Spin Time associated with them due to function inlining without corresponding debug information.

When analyzing an Intel TBB application with Intel® VTune™ Amplifier XE, we recommend that you enable inline debug information to ensure Overhead and Spin Time metrics are as accurate as possible. Using a compiler that performs inlining (as is the case with most optimized builds) in conjunction with Intel TBB may result in aggressive inlining of user code into Intel TBB template functions and methods. This may cause time that would normally be classified as Effective Time being incorrectly classified as Overhead or Spin Time.

If you're seeing results that appear to have much more Overhead or Spin Time and much less Effective Time, make sure you have enabled this option in your compiler.

To enable this option for the various compilers listed below, use the corresponding flag:

GCC* in Linux*

-g flag

Intel Compiler on Linux

"-debug inline-debug-info"

Intel Compiler on Windows*



Below are two examples of the same application compiled without this flag and with this flag respectively. Notice that the call stack in Figure 1 ends at the Intel TBB execute() function while the call stack in Figure 2 includes function names from the user code, e.g. IsPrime(). In both examples, the compiler inlined the IsPrime() function, however only the second example includes the debug information which is passed along to VTune Amplifier. Also notice the large amount of Overhead Time in the first example. This time was classified as Overhead Time because there was no information from the compiler about the inlined user code. Also notice the large amount of red in the timeline of Figure 1. This red represents Overhead or Spin Time. If your application shows these symptoms and you believe this to be incorrect, ensure you have enabled inline debug information as described above.

No Inline Information

Figure 1: VTune Amplifier result without inline debug information

With Inline Information

Figure 2: VTune Amplifier result with inline debug information enabled

For more information on enabling inline debug information, see the VTune Amplifier Help section titled “Viewing Data on Inline Functions”.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.