For each place where data item is changed, Rational Statemate generates the following instrumentation: { X = 5; add_report(&rep_X); }. By calling the
add_report()
function, the report element corresponding to X to the list of elements that were changed during the current step is added. At the end of this step, a special function passes the list and calls functions that do the actual tracing and/or out mapping. If immediate field of report element is true, theadd_report()
function bypasses the list mechanism and calls immediately to the function that does the tracing.If at the current step the tracing is switched off, the
add_report()
function does nothing. The list of the report elements is static; that is, there is no dynamic memory allocation. The list management is done statically by manipulating thenext_elem
field of the report element.All buffered tracing messages are sent to the trace buffer. The buffer has a fixed, predefined size. The same moment the buffer becomes full, its contents are out and cleaned up. The same is done at the end of each step, regardless of whether the buffer is full. This process is run in the low-priority task.
In output mapping, the buffered field of the report element dictates the way the output message is handled. Either it is buffered in the manner similar to tracing, or it is sent to the output card immediately.