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 theIntel AdvisorGUI: Go to and selectDuring collectiondrop-down option.
- From the command line interface (CLI): Use the--stackwalk-mode=onlineoption. 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 theIntel® C++ Compiler Classicor theIntel® oneAPI, use the following options:DPC++/C++Compiler
- Request moderate optimization:
- On Linux* OS and macOS*: useO2or lower
- On Windows* OS: use/O2or 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: useZi, Z7, ZI
To generate additional debug information in the object file, use-g3orZI. - 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=0or/Qunroll:0.