I am trying to profile statically linked binary using Vtune 2021.3.0 installed with oneapi kit.
I have build the application with the required switches i.e. -g, -O2 and -Wl, -u__setenv. As you can see from attached image which is output of "objdump -x <target binary name> | grep setenv", __setenv symbol is exported to the binary.
However, when I am trying to profile this binary with Vtune with hotspot analysis with the following command, it still throws the following error:
vtune: Error: Valid setenv symbol is not found in the binary of the analysis target.
vtune: Error: Binary file of the analysis target does not contain symbols required for profiling. See the 'Analyzing Statically Linked Binaries' help topic for more details. I vtune -collect hotspots -search-dir=/usr/lib/debug/lib64 <path to binary>
I received the above error with the following command:
vtune -collect hotspots -search-dir=/usr/lib/debug/lib64 <path to binary>
where /usr/lib/debug/lib64 is the path to directory where the symbol libc-2.28.so.debug is located.
Could you please help on the above issue.
Thanks for reaching out to us.
Could you please confirm whether the binary file exports all the symbols from system libraries as mentioned in the below documentation:
If the issue still persists, please share reproducer code and the complete steps you followed so that we can try out the same from our end.