Run and profile a process
Create a QNX Application launch configuration for an executable with debug information as you normally would, but don't click OK. You may choose either a Run or a Debug session.Debug mode isn't recommend for running Function Instrumentation mode, because it can skew the profiling data results.
In your launch configuration, click the Tools tab.
Click Add/Delete Tool…. The Select tools to support dialog appears.
Select the Application Profiler tool.
In the Application Profiler mode, select your profiler method, profiler mode, and other options, if applicable.
If you want the IDE to automatically change to the QNX Application Profiler perspective when you run or debug, check the Switch to this tool's perspective on launch box.
Click Run or Debug.The IDE starts your program and begins to profile it.
To produce full profiling information with function timing data, you need to run the application as root; this is required when running through qconn.
If you run the application as a normal user, the Application Profiler tool can generate only call-chain information.
You have to specify the Shared library path in two locations: use the Uploads tab in the launch configuration if libraries have to be uploaded every time an application runs, and use the Shared Libraries tab on the Tools tab to specify the host location of libraries so that the IDE can read their debug symbols to show their symbol information.
Since the dynamic library isn't included with the IDE, there is an issue caused by the static linkage of the profiling library. To solve this problem, you'll need to do the following:
- When profiling with Function Instrumentation with dlopen, you'll need to build the application with the options -Wl,-E. To set these options:
- To update the build property, select the Linker tab.
- In the Export symbol options dropdown list, select Export all symbols.
Make sure that the text box for Linker options includes the -Wl,-E options.
- Click OK.
- Verify that the DLL library is instrumented.
- If you open the Filter dialog, you can enable the option Show unresolved symbols to see the calls that were made. If you don't see any calls, this means that the library symbols can't be read, and that the DLL library is likely not instrumented. To make sure the symbols can be seen, you need to add the path to this library in the Shared Library area in the Launch Configuration, and ensure that the file name is the same as the one you specified. If it isn't the same, you'll need to recompile your library with the appropriate name set.