I want to profile application from QtCreator using Vtune on Windows 7 . But Vtune is basicaly made for Visual Studio Apps, so I have to make the link between my function's names and the instruction in release build. Actually I have only pseudo names func@address in Hotspots ,its not usable.
By exploring the "Getting Started" from Intel Vtune I find that I must enable the Debug Information in my release build but How to perform that in QtCreator?
From 'Using Debug Information' File:
To provide accurate performance data and enable source analysis, the Intel® VTune™ Amplifier requires debug information for the binary files it analyzes. If it does not find debug information in the binaries, the VTune Amplifier statically identifies function boundaries and assigns hotspot addresses to generated pseudo names func@address for such functions.
If debug information is absent, the Call Stack pane may not unwind the call stack correctly for user-mode sampling and tracing analysis types. Additionally in some cases, it can take significantly more time to finalize the results for modules that do not have debug information.
On Windows* operating systems, PDB files provide debug information. Make sure both your system and application libraries/executable have PDB files. Compile your target with optimizations and start profiling its performance.
By default, the Microsoft Visual Studio* IDE does not generate PDB information in the Release mode. For better results with the VTune Amplifier, enable symbol generation manually. For system libraries, use the Microsoft* Symbol Server to download the required PDB files from the Microsoft* web site. Follow the steps below to ensure the VTune Amplifier uses debug information for both system and your own libraries.
I try some methods like: -edit the file.pro to change the release build
QMAKE_CXXFLAGS_RELEASE += -g
QMAKE_CFLAGS_RELEASE += -g
QMAKE_LFLAGS_RELEASE =
but it doesn't change anything, i still haven't the function name printed
Any input is much appreciated.
Yes, for VTune (or other similar profiling tools) you need "release build" (ie optimization switched ON) with debug information switched ON as well. QTCreator doesn't create this kind of release+debug configuration by default.
For Windows MS compiler toolchain case it implies that you have to supplement Release configuration with additional /Zi compilation and /DEBUG linker options.
In order to propagate these additional options in QTCreator use following steps (see also screen-shot below):
QMAKE_CXXFLAGS+=-Zi
QMAKE_LFLAGS+=/DEBUG
Few more minor notes:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.