Intel® Advisor User Guide

ID 766448
Date 10/31/2024
Public
Document Table of Contents

Problem: Stack in the Top-Down Tree Window Is Incorrect

Symptoms

After you run any Intel® Advisor analysis, the Top-Down view in a displayed report shows application stack that is unexpected or does not make sense.

Cause

The target was built with an optimization level that removed stack information from the binary.

Possible Solution

Do one of the following:

  • Change the stackwalk mode from offline (after collection) to online (during collection):

    • From the Intel Advisor GUI: Go to Project Properties > Analysis Target > Survey Hotspots Analysis > Advanced > Stack unwinding mode and select and select During collection drop-down option.

    • From the command line interface (CLI): Use the --stackwalk-mode=online option. For example:

      advisor --collect=survey --project-dir=./myAdvisorProj --stackwalk-mode=online -- ./bin/myTargetApplication

    This option increases analysis overhead.

  • Decrease the optimization level of your project and rebuild the target. For example, with the Intel® oneAPI DPC++/C++ Compiler, use the following options:

    • Request moderate optimization:

      • On Linux* OS and macOS*: use O2 or lower

      • On Windows* OS: use /O2 or lower

    • Disable compiler inlining:

      • On Linux OS and macOS: use -fno-inline

      • On Windows OS: use /Ob0

    • Disable interprocedural optimization:

      • On Linux OS and macOS: use -no-ipo -no-ip

      • On Windows OS: use /Qipo- /Qip-

    Consider also using the following options:

    • Select the maximum level of debug information:

      • On Linux OS and macOS: use -g[n]

      • On Windows OS: use Zi, Z7, ZI

      To generate additional debug information in the object file, use -g3 or ZI.

    • Set a maximum number of times to unroll loops:

      • On Linux OS and macOS: use -unroll[=n]

      • On Windows OS: use /Qunroll[:n]

      To tell the compiler not to unroll loops, use -unroll=0 or /Qunroll:0.

Related information