Runtime analysis overview

The runtime analysis tools are designed to closely monitor the behavior of your application for debugging and validation purposes. These features use source code insertion to instrument the source code providing dynamic analysis of the application while it is running, either on a native or embedded target platform.
The following tools are available:

Each of these runtime analysis tools can be used alone or together with the component testing features. When the source code is run with any of the runtime analysis tools engaged, either alone or in a component test, the source code is instrumented. The resulting instrumented code is then executed and the result is dynamically displayed in the corresponding reports.

Note: Instrumentation of the source code generates a certain amount of overhead, which can impact application size and performance.

Runtime analysis tools can analyze source code that complies with ANSI 89, ANSI 99, C99, and K&R C specifications.

Code coverage

Source code coverage consists of identifying which portions of a program are executed or not during a given test case. Source code coverage is recognized as one of the most effective ways of assessing the efficiency of the test cases applied to a software application.

The code coverage tool can provide the coverage information for the following source code elements:
  • Statement blocks, decisions, and loops.
  • Function or procedure calls.
  • Basic conditions, modified conditions/decisions (MC/DC), multiple condition, and forced condition.
  • Procedure entries and exits.
  • Terminal or potentially terminal statements
  • Statements that are considered non-coverable in C.

Memory profiling

Runtime memory errors and leaks are among the most difficult errors to locate and the most important to correct. The symptoms of incorrect memory use are unpredictable and typically appear far from the cause of the error. The errors often remain undetected until triggered by a random event, so that a program can seem to work correctly when in fact it's only working by accident. Memory profiling helps you detect HEAP memory allocation problems and leaks.

After execution of an instrumented application, the Memory Profiling report provides a summary diagram and a detailed report for both byte and HEAP memory block usage. The summary diagrams give you a quick overview of HEAP memory usage in blocks and bytes, including:
  • The total HEAP memory allocated during the execution of the application.
  • The HEAP memory that remains allocated after the application was terminated.
  • The maximum HEAP memory usage encountered during execution

The detailed section of the report lists memory usage events identified as errors or warnings.

Restriction: With Rational® Test RealTime for Eclipse IDE, static and stack memory are not checked, only dynamically allocated memory is checked.

Performance profiling

The performance profiling tool provides performance data for each software component so that you can locate the performance bottlenecks. With this information, you can concentrate your optimization efforts on those portions of code, which can lead to significant improvements in performance.

The Performance Profiling report provides function profiling data for your program and its components so that you can see exactly where your program spends most of its time. A Top Functions graph provides a high level view of the largest time consuming functions in your application. The Performance Summary section of the report indicates, for each instrumented function, procedure, or method (collectively referred to as functions), the number of calls and the time spent in the function and in its descendants.

Runtime tracing

Runtime Tracing is a tool for monitoring real-time dynamic interaction analysis of your source code by generating trace data, which is dynamically turned into a UML sequence diagram. The diagram displays a lifeline of the interactions of the source code components.