background image
<< To activate Runtime Analysis features | Viewing Results from Rose RealTime >>
<< To activate Runtime Analysis features | Viewing Results from Rose RealTime >>

Collecting Trace Dump Data

Test RealTime - User Guide
Collecting Trace Dump Data
Rational's Source Code Insertion (SCI) technology is designed to minimize overhead.
The instrumented code stores information in memory (except for the Runtime
Tracing feature) and dumps this SCI data when the program terminates. To use this
technique, you must add a call to a dumping function in your source code:
extern "C" _atl_obstools_dump(int);
...
_atl_obstools_dump(1);
In some cases, such as in embedded applications, it is not practical to dump traces
upon exit. See Generating Trace Dumps for more information.
To connect the SCI data dump to the Rose RealTime Stop button:
1.
Add the following code to the cmdCommand.cc file.
At the beginning of the file:
#include <RTDebugger.h>
#include <RTMemoryUtil.h>
#include <RTObserver.h>
#include <RTTcpSocket.h>
#include <stdio.h>
extern "C" _atl_obstools_dump(int);
In the RTObserver::cmdCommand method:
else if( 0 == RTMemoryUtil::strcmp( commandString, "stop" ) )
{
_atl_obstools_dump(1);
printf("TestRT dump\n");
haltByProbe = 0;
resumeToRun = 0;
debugger->step( 0U );
}
2.
Re-compile this file and add the cmdCommand.obj to the Additional Object
Files section of the model's Component Specification window
Note For Visual C++ 6.0, such an object file is already provided in
<install
dir>
\bin\intel\RoseRT\VC6
where <install dir> is the Test RealTime installation directory.
3.
By default, when executing the model, press the Rose RealTime Stop button to
ensure that trace information is uploaded.
Any other code point could be used to dump the traces, as long as the chosen code
point is linked to a specific event--a particular message or an external event--in
order to force the dump.
338