Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1737: IDE4.5ApplicationProfilerTrial (Version 3)

Application Profiler in IDE 4.5: Installation and Usage Instructions#

Installation#

  • Install Momentics 6.3.2 on the host machine (Windows or Linux). Probably would work on any other 6.3 or 6.4 SDK you have.
  • Install latest IDE Tau on host machine from http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/Builds_Tau_Integration or if you have it already installed, install latest updates for IDE Tau from update site: https://www.qnx.com/account/updates/foundry27/ide/tau (see below how), update from IDE 4.0.1 would not work, you have to install Tau from zip first.
    • To install full IDE Tau from .zip file pick one for your host from location above
    • Download it and unzip where you want. This would be your IDE Tau installation directory.
    • Run IDE: execute qde from there Tau installation directory.
  • To use update site
    • Add this update site using Help->Software Updates->Find and Install...
    • Select Search for new features to install. Click Finish.
    • Click New Remote Site and fill the dialog with url (https://www.qnx.com/account/updates/foundry27/ide/tau) and name "Internal IDE Tau update site".
    • Select this site. Click Finish.
    • Select All Features. Click Finish. Select Install All. Restart IDE.

Note: If you see Application Profiler 2 tool (in launch configuration tabs) you using older version which have both profiler, use "2" version for all steps in instructions below. If you want to update it is better to re-install from the scratch otherwise you have to disable old profiler feature manually.

Build & Launch#

Sampling Mode #

Sampling is original mode of Profiler, you still can do it. To prepare binary you either don't do anything, or use -p option for compiler and linker. This mode won't give you precise function times and you rely on the fact the application is running for a long time. It would be almost the same as old profiler except a little bit better editor annotations and compare session support. This works only if you launch application from IDE. Create a launch configuration for your application, add Tools->Application Profiler and select Sampling mode in the tab,

Function Instrumentation Mode #

Build Flags#

This method allow to get precise function run time. It better works for one thread, because with many threads overhead of such measurement can change application behavior.
  • if you using qnx projects or managed make project select build option Build with Profiling
  • if you using makefile
    • to compile application/library with instrumentation add option -finstrument-functions
    • to link add option -lprofilingS and -L<path to libprofilingS.a>
    • if you installed the patch on host it should find it automatically

Launch from IDE #

  • Assuming you have your code as IDE Project and binary/library located there
  • Create new Launch configuration
  • In Tools tab select Add Tools... and select Application Profiler
  • In Drop Down menu select Instrumentation (NOT Sampling)
  • Click Apply and Run.
  • If process does not finish itself, you have to kill it because this would be sign to IDE to download data. It does not support interactive mode right now.
  • Instead of terminating process you can just terminate QNX Application Profiler service in the Debug view, it will download current state of data.

Launch from Command line on target #

To launch on target:
  • set QPROF_FILE env var to /tmp/profiler.ptrace (does not really matter what file, but matter where is it - it can be huge)
  • launch binary, perform test and stop it after some time, because trace cannot hold more than several seconds, minutes at most.
  • In IDE. Copy file $QPROF_FILE into IDE workspace (into target project for example) using Target File System Navigator view.
  • Switch to "Application Profiler" perspective
  • In Profiler Session view select action Import
  • Follow import wizard and specify binary and shared libraries paths. If binary was not compiled on the same host you need to edit source path tab to add source search path or mapping between compiled code location and location of the sources on the host.
  • Click Finish. IDE would create a session and automatically select it. I hope.

Analyzing Data #

It should be self explanatory in most of the cases.

There is an feature description article at: What is New in Application Profiler

If you have any questions or feedback, post into the ide forum.

Attachments:
Image et_diff.png [IDE4.5ApplicationProfilerTrial/et_diff.png]