Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
Products
QNX Momentics
Application Analysis

Application Analysis

QNX Software Systems
Tools
Code Development
Debugging + Optimization
Application Analysis
Target System Tools
Photon Application Builder

Related resources
Product briefs
Whitepapers
Webinars
Product documentation
BSP supported hardware

Memory analysis

The QNX Momentics memory analysis tool combines powerful visualization features with an innovative method of databasing memory usage, allowing developers to quickly pinpoint memory errors and leaks, and optimize memory usage.

The memory analysis tool helps developers visualize the memory usage of programs, and can quickly detect buffer overruns, invalid deallocations, and other common memory errors. It provides:

Catch memory errors using the allocation library

QNX Momentics provides an allocation library with cover routines for most string and memory operations. These routines check the integrity of memory before using it, allowing developers to catch errors such as overruns, underruns, invalid use of memory, and freeing the same memory twice. Once an error is found, a convenient back trace places shows the code editor at the offending line of code. These bugs can be fixed and retested quickly before submission to a project's build.

  Memory analysis screenshot

Choose the best method for dealing with errors

The memory analysis tool intelligently tracks each memory error as a task, and automatically annotates the program source with a warning. When a memory error is detected, developers can:

In each case the memory analysis tool indicates the source of the problem along with a call stack trace indicating the path that caused the error. Fixes are quickly made and tested.

Profile memory usage for in-depth understanding

Understanding the memory profile of a system is key to optimizing memory resources. The memory analysis tool tracks all memory allocations and deallocations and displays these in a time-ordered fashion to assist in understanding when, where, and how memory is being used.

Optimize memory resources

Using memory profiling technology, the memory analysis tool can help indentify opportunities to optimize memory usage. For example, memory profiling may reveal heavy memory usage of a certain size at fixed intervals. The memory profile indicates when the memory is allocated, where it's allocated in the code, how often and at what time intervals. Unwanted allocations can then be easily traced to the code where developers can implement a more efficient scheme.

Application profiler

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:

Use statistical profiling for non-intrusive measurement

By sapling 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.

Code coverage

Accelerate the optimization, testing and quality assurance phases of embedded development. The code coverage tool in QNX Momentics development suite supports a methodology for ensuring code quality and product integrity.

The code coverage tool identifies areas of code that have not been exercised during testing, allowing further action to be taken, such as modify the test suite to ensure complete test coverage, or determine whether the code is no longer required.

Since the code coverage tool is fully integrated with the IDE, developers can perform testing, optimization, and quality assurance with much less effort.

Code coverage is an essential tool for environments where testing, bug fixing, and software maintenance are handled by separate groups, who may not be involved in the original code development. Code coverage allows:

  Code coverage screenshot