Previous: Switching Adaptive or Random Behavior of a Multinode Model, Up: Executing a Multinode Model [Contents][Index]
QSMM provides facilities for tracing events related to a multinode model. You can specify the types of events dumped to a trace log using a bitmask defined as a subset of the following macros merged by bitwise “or.”
Multinode model API calls entry and exit. API functions with a model handle argument dump a function name, the names and values of function arguments, and a returned value.
The beginning and end of processing every model event by event handlers with dumping event parameters.
Calling nodes, returning control from nodes, instruction invocations, and the outcomes of those invocations.
Use the following functions to query or set a bitmask of types of events dumped to a trace log.
This function returns the bitmask of types of events dumped to the trace log of a multinode model.
The model is the originator of those events.
This function returns a bitmask set by the function qsmm_set_trace_flags
or a default bitmask (see a remark below) if the latter function not yet called.
This function sets to flags the bitmask of types of events dumped to the trace log of a multinode model. The model is the originator of those events. The function does not check whether the bitmask is correct.
The function qsmm_create
initializes the bitmask of types of events dumped to a trace log to 0.
A multinode model does not dump messages to a trace log unless the multinode model has an assigned stream for the trace log. Use the following functions to get or set the stream.
This function returns a stream for the trace log of a multinode model.
If the model does not have the stream assigned, the function returns NULL
.
This function sets to filep the stream for the trace log of a multinode model.
The NULL
stream disables dumping log messages.
Use the following functions to write a custom formatted message to the trace log.
These functions write a formatted message to the trace log of a multinode model.
They append the character ‘\n’ to the message and flush the stream buffer.
If the trace stream not set, the functions have no effect.
The meaning of fmt argument and subsequent arguments of qsmm_trace_f
function is the same as in the function printf
.
The meaning of fmt and ap arguments of qsmm_trace_fv
function is the same as in the function vprintf
.