Application Profiler is a QNX tool that allows you to view the profiling results generated by instrumented binaries that run on a QNX Neutrino target. The results tell you who called each function as well as how often, how long was spent in each function, and how much CPU time individual lines of codes used. This helps you locate inefficient areas in your code without following its execution line by line.
When the launch mode is Profile, the Application Profiler is enabled by default. For other launch modes, you can enable the tool manually through the launch configuration Tools tab (Run, Debug, or Attach modes) or Memory tab (Memory mode). It isn't supported by the Coverage or Check modes.
These options are available only when the Profiling Method is Functions Instrumentation and the Profiling Scope is Single Application.
These options are available only when the Profiling Method is Functions Instrumentation, for either a single application or a system wide profiling scope.
When you launch an application with the Application Profiler enabled, the IDE switches to the QNX Analysis perspective and opens the Execution Time view, which shows the application's execution time by function. The IDE also creates a session for storing the profiling results, and displays this new session in the Analysis Sessions view.
This view displays all sessions from analysis tools run on a project within the current workspace. Each session has a header containing the tool icon, binary name, session number, and launch time. Sessions from the Application Profiler, Code Coverage, Memory Analysis, and all Valgrind tools are listed in this view, from the newest (at the top) to the oldest (at the bottom). The session number gets incremented each time a program is run with any of these tools.
For profiling sessions, the icon is a circle with a small clock and checkmark
().
Double-clicking the header opens the session (if it's not open)
and displays function information from all components in the
Execution Time view. To filter the results, expand the
header and click the appropriate component. For example, to display results for
functions in your program code but not in any libraries that it uses, click the
application binary.
When you select an active profiling session, which means the application is still
running, the view toolbar provides
Resume Profiling () and
Pause Profiling (
) controls that let you
start and stop profiling. You can specify signals to act as start and stop hooks
for these controls, through the
Control panel.
The Take Snapshot button (
) is also active, and it
allows you to capture the current data without stopping the profiling activity.
You can then compare the snapshot data with the final results or other snapshots.
Deep Time — The time it took to execute the function and all of its descendants. This metric is also referred to as Total Function Time. It is the pure realtime interval from when the function started until it ended, which includes its shallow time, the sum of its children's deep times, and all time in which the thread wasn't running while blocked inside of it. If the function was called more than once, this column contains the sum of all runtimes when it was called from a particular stack frame or parent function.
Inside each column entry, on the left, a green bar and percentage value indicate the relative execution time. On the right, another value indicates the absolute execution time.
For Sampling mode, this column isn't used.
Shallow Time — For Function Instrumentation mode, this column is the deep time minus the sum of its children's runtimes. It roughly represents the time spent in this function only. However, it also includes the time for kernel and instrumented library calls and for profiling the code.
For Sampling mode, it's an estimated time, calculated by multiplying an interval time by the count of all samples from this function.
The column entries have a green bar overlaid with a percentage value (on the left) and another numeric value (on the right). These items provide similar information as in the Deep Time column.
You can compare the results of two profiling sessions to see the effect of changes you made to an application. The comparison feature calculates and displays the differences in function runtimes and other metrics between the sessions, in the Execution Time view.