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:
In order to instrument,
compile 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.
Notice that in the Output Window at the bottom of the screen, on the Build tab, you can see the instrumentation and compilation 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 Test RealTimePurifyPlus RealTimePurifyPlus for Linux Text Editor.
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.)
Close the Project
Explorer window on the right-hand side of the UI by clicking the Close Window button; do
the same for the Output Window at the bottom of the UI.
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
toolbar button 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 careless memory usage, performance bottlenecks, incomplete code coverage, and dynamic runtime sequencing.