Use the Application Profiler

The QNX Application Profiler perspective lets you examine the overall performance of programs, no matter how large or complex, without following the source one line at a time. Where a debugger helps you find errors in your code, the QNX Application Profiler helps you pinpoint inefficient areas of your code that could run more efficiently.

By default, the Application Profiler perspective includes these main views:

Types of application profiling

Function Instrumentation profiling
Provides precise function runtime information for your project. It performs better on one thread, because with many threads, the overhead of such measurement can change the application's behavior.

To enable instrumentation, compile each source file with the option -finstrument-functions. This gcc option instructs the compiler to generate a call to the profiling function just after the entrance to, and just before the exit from every application function, which permits the collection of profiling information. Profiling functions are defined in the libprofilingS.a library; to access these, link the binary or library with the -lprofilingS option.

For an application that intends to use an instrumented library as a DLL (i.e. using a dlopen call), compile the library and the binary with the -Wl,-E linker option.

Postmortem profiling for Call Count and Function Instrumentation profiling
The Momentics IDE for BlackBerry lets you examine profiling information from an output file produced by an instrumented application (i.e. gmon.out). The tool provides you with all of the information collected at runtime, but in a graphical format.

Postmortem profiling supports data generated by gprof (gmon.out), the QNX profiler library (.ptrace), and the trace logger (.kev).

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus