Running and profiling a process
To run and profile a process, with qconn on the target:
- 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.
Note: Debug mode isn't recommend for running
Function Instrumentation mode, because it can skew the profiling data
- In your launch configuration, click the Tools tab.
- Click Add/Delete Tool…. The Select tools
to support dialog appears.
- Select the Application Profiler tool.
- Click OK.
- In the Application Profiler mode, select your profiler method, profiler mode, and
other options, if applicable.
To run in Sampling mode, select Sampling and Call Count
Instrumentation; to run in Sampling and Call Count mode,
select Sampling and Call Count Instrumentation; to
run in Function Instrumentation mode, select Function
Instrumentation and Single
For descriptions about these options, see Application Profiler tab.
- 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 Apply.
- 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
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
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
- When profiling with Function Instrumentation with dlopen(), you'll need to
build the application with the options -Wl,-E. To set these options:
- 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