Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1249: ApplicationProfiler (Version 1)

Overview#

Examine the overall performance of programs, no matter how large or complex without following the source one line at a time, with the QNX Momentics application profiler.

Using the application profiler, quickly target areas of highly used code for debugging, performance analysis, and optimization of "hot spots". For instance, developers can:

  • gather live profiling by attaching the profiler to software already running on the target
  • drill down to source-line level to show which lines consume the most CPU
  • analyze processor usage for multiple processes and targets, as well as for shared libraries
  • capture complete execution information by compiling and launching a new copy of the software on the target
  • perform postmortem profiling and analysis by loading statistical files into the profiler

Use statistical profiling for non-intrusive measurement#

By sampling execution at regular intervals, the application profiler builds a picture of where the system is spending time in the code, without need for instrumentation, code changes, or special compilation. This non-intrusive profiling also insures that the profiler doesn't bias the information collected. The application profiler provides processor time usage for each thread and displays this information both in absolute times and as percentages of total time —sort both forms in any way. The application profiler the sampling process to be reset without restarting applications, so developers can compare results for the application under different loads. Better yet, the profiler can analyze dynamically loaded shared libraries to help determine whether a performance problem originates in the application code or in a library the application uses.

Application Profiler Screenshot

Use instrumented profiling for accurate execution counts#

To gather additional runtime information, the compiler will instrument the compiled code for profiling. The instrumented code will report function calls and provide call-pair (caller-callee) information. Once call counts and execution statistics have been used to pinpoint bottlenecks, developers can use the navigable call graph to find the callers and ancestors of a function — great for identifying where to best for code optimization.

Pinpoint inefficiencies right down to the offending source line#

Knowing which functions consume processor time often isn';t enough. Consequently, the application profiler can drill down to the source-line level, showing which lines consume the most CPU. It does this by graphically annotating source code in the C/C++ editor, showing the percentage of processor time per function and per source line. Developers can graphically compare the effect of different optimization strategies, pinpoint inefficient algorithms, and focus on optimizing the right code, simply by browsing the source.

Find opportunities for parallelism#

Multi-core technology along with QNX support for Symmetric Multiprocessing (SMP) provides true parallelism for embedded systems. The application profiler provides the quick answer to the question, “Where can I optimize my system for multi-core execution?” by finding portions of code that are candidates for parallelization. After an initial port to a multi-core system, developers can quickly isolate code for parallelizing based on an application profile analysis. For example, a CPU-intensive signal processing routine will stand out in an application profile; breaking this into several multithreaded routines will allow for parallel execution on a SMP kernel such as the QNX Neutrino RTOS.

Resources#