If you want to start seeing function runtimes and call counts for a running process, you can attach the Application Profiler tool.
The IDE then displays the profiling data received from the instrumented binary running on the target.
To attach the Application Profiler to a running process:
-
In the launch bar, expand the Launch Configuration dropdown (which is in the middle) and select the application
for which you want to see profiling data.
-
In the Launch Target dropdown (on the right), select the target on which the application is running.
-
In the Launch Mode dropdown (on the left), select Attach.
-
Click the Edit button ()
on the right of the Launch Configuration dropdown.
-
Enable the Application Profiler in the launch configuration:
-
Click the Tools tab on the right.
-
Click the Application Profiler radio button.
-
Ensure that the Profiling Method selection matches the instrumentation
used by the application.
-
Optional: If needed, configure other tool settings to customize how data are transferred to
the IDE and which signals are used to start and stop profiling.
Based on these settings, the Application Profiler will modify how the application is behaving
when it's attached to the application process.
-
Optional: Enable or disable other analysis tools.
CAUTION:
Don't enable the debugger when attaching the profiling tool.
Stopping at breakpoints and stepping through code makes the function runtimes completely inaccurate.
You should therefore ensure the debugger checkbox is unchecked at the top of the
Debug tab.
If you chose a Profiling Scope of System Wide, you must also run the
System Profiler by checking this tool's box at the bottom of the Tools tab.
This makes the IDE perform a kernel event trace while
gathering profiling data.
-
When you've finished configuring the tools, click OK to save the changes and exit the window.
-
Click the Attach button ().
The IDE switches to the Debug perspective if the debugger is enabled, or the QNX Analysis perspective if it's not,
then opens the
Select Process popup window. This window lists the processes with the same name as
the binary specified in the
Main tab.
-
Click the process that you want to attach to, then click OK.
The IDE attaches the Application Profiler and any other enabled tools to the selected process.
In the current perspective, you'll see a new session for storing the debugging or profiling results.
Depending on the active tools and their configuration, these results might get updated as the program runs.
In the QNX Analysis perspective, you can see the function runtimes and call counts in the
Execution Time view. The Application Profiler reference explains
how to interpret the results.