You can run a process on the target (without the IDE) and collect the profiling
information while it's running. In order to collect profiling information, you have
to modify the way you normally launch your application by adding environment
variables:
Note: If you're launching using the IDE, you can specify the environment variables on
the Environment tab in the launch configuration.
Note: When you profile a running process, you can't use the Console view in the IDE to
interact with this process. If your running process requires user input through the
Console view, use a shell to interact with the process.
To profile a process that's already running on your target:
-
While the application is running, open the Launch Configurations dialog by
choosing from the menu.
-
Select C/C++ QNX Attach to Remote Process via QConn (IP)
from the list on the left.
-
Click the New button to create a new attach-to-process
configuration.
-
Configure things as you normally would for launching the application with
debugging.
-
On the Tools tab, click Add/Delete
Tool…. The Tools Selection dialog is displayed.
-
Select the Application Profiler tool, then click
OK. On the launcher, the Application
Profiler tab is displayed.
For descriptions about the options, see Application Profiler tab.
-
If you're using Function Instrumentation, make sure that the value in the
Path on target for profiler trace field matches the
value of QPROF_FILE that you used to run the application.
-
Select Switch to this tool's perspective on launch.
-
Optional: In the launcher, click the Shared Libraries
tab.
The IDE doesn't know the location of your shared library paths, so you must
specify the directory containing any libraries that you wish to profile.
-
Click Apply, and then click Run.
The Select Process dialog shows all of the currently running processes:
-
Select the process you want to profile, and then click
OK.