When profiling with the Momentics IDE for arm aarch64 using "Sampling" without "Call Count Instrumentation" after compiling the executable with "-g", the "Execution Time" view does not display the call and method names where runtime has been spent. Instead each code position starts with something like "0x100c76d0@Executable
", where Executable
is the name of the actual executable that is being profiled. It is not possible like this to navigate through the source code with profiling annotations.
If I rebuild the application adding the compile option -no-pie
, profiling becomes possible. Source code positions are written as a combination of class and method names and source code annotation is possible.
What is the reason for that? Is is that ASLR (https://en.wikipedia.org/wiki/Address_space_layout_randomization) renders profiling impossible? And no-pie
disables ASLR? This seems not to be the case for operating system other than QNX!
I have also tried to profile the PIE application adding on -ad
to the call, but it didn't work in Momentics.
Right now I have found out another way to fix profiling: if I disable "Use unique name" in the "Upload" tab of the launch configuration, the source code positions can again be correctly located and named. This is completely surprising. What has the executable name to do with profiling results?