Profiling applications

From the IDE, you can build an application for profiling and launch it. The Application Profiler then displays, in the QNX Analysis perspective, how much execution time is consumed by different functions.

Profiling applications helps you pinpoint inefficient areas in your code, without having to follow execution line by line. The Application Profiler tool lets you measure precise function runtimes or obtain runtime estimates based on execution position sampling. For both methods, the tool also reports call counts. When measuring runtimes, you can also run a kernel event trace to see when an application's functions are executed relative to other system events.

When you enable profiling for an application or library, the binary that gets built includes debug information. This is so the profiler tool can match addresses in the results with lines of code and display the symbols (i.e., line numbers backtrace). Any binary with debug information has a bug icon (Icon: Small blue bug) next to its name in the Project Explorer. The binary selected for running when you launch a project depends on the launch configuration settings.

For applications already running, you can attach the Application Profiler tool to start seeing results in the IDE. You can also perform a postmortem analysis, in which you build an application for profiling, run it from the command line on a QNX target, then import the results into the IDE.