Building and Executing the Application

When performing runtime analysis, your source code must be instrumented. Instrumentation, by default, is enabled for all four runtime analysis features - that is, for memory profiling, performance profiling, code coverage analysis and runtime tracing. All four features are turned on by default.

To build and execute the application:

  1. In order to instrument, compile, link, and execute the UMTS base station application in preparation for runtime analysis, simply ensure the BaseStation application node is selected on the Project Browser tab of the Project Explorer window, and then click the Build button.
    Do so now.

Note   More information about the source code insertion technology can be found in the User Guide, in the chapter Product Overview->Source Code Insertion.

  1. Notice that in the Output Window at the bottom of the screen, on the Build tab, you can watch the preprocessing, instrumentation, compilation, and link phases of the build process as they occur. A double-click on an error listed within any of the Output Window tabs opens the relevant source code file to the appropriate line in the OneTest Embedded Editor.

  2. The build process has completed, and the UMTS base station is running, when the UML-based sequence diagram generated by the runtime tracing feature appears. (More about this feature in a moment.)

  3. Close the Project Explorer window on the right-hand side of the UI by clicking the Close Window button.

Notice how the graphically displayed data in the Runtime Trace viewer dynamically grows - this is because the UMTS base station is being actively monitored. The UMTS base station endlessly searches for mobile phones requesting registration; the Runtime Trace viewer reflects this endless loop. If you wish, use the Pause button on the toolbar to stop the dynamic trace for a moment (the trace is still being recorded, just no longer displayed in real time). In addition, use the Zoom In and Zoom Out buttons on the toolbar to get a better view of the graphical display (or right-click-hold within the Runtime Trace viewer and select the Zoom In or Zoom Out options). Undo the Pause when you're ready to proceed.

You'll look at the Runtime Trace viewer in more detail later. Of primary importance right now is interaction with the UMTS base station. You'll do this by using the mobile phone simulator mentioned earlier in the Overview section of this tutorial. Through this manual interaction you will expose memory leaks, performance bottlenecks, incomplete code coverage, and dynamic runtime sequencing.