mltrace
Abstract
Sets a labeled trace that is limited to the specified module. Invocations of the KP op_prg_odb_ltrace_active() will return 1 if passed a label argument that matches the trace.
Syntax
mltrace <objref> <label>
| Argument | Type | Description |
|---|---|---|
<objref> |
integer or string | numeric object ID or hierarchical name of the module-of-interest An object ID for this argument can be obtained by using the ODB commands objmap or objid. |
<label> |
string | label string of the trace The label can include alphanumeric characters, spaces, and selected punctuation, but must be surrounded by double quotes if spaces are included. The labels used for traces exist in a different space from those used by labeled breakpoints. Traces and breakpoints can have labels with the same name, but they do not affect each other. |
Details
KP trace messages are not issued by labeled traces; instead, invocations of op_prg_odb_ltrace_active() return 1, which can be used to trigger user-defined diagnostic messages or other actions (see op_prg_odb_ltrace_active() on page 85 for more details on this KP). An event that directly or indirectly leads to the invocation of op_prg_odb_ltrace_active() is indicated by an event banner. Traces can be suspended by the command susptrace, reactivated by acttrace, or deleted by deltrace.
Example
This example assumes that a statement similar to the following one appears in the code wherever a “pk_created” trace is desired.
if (op_prg_odb_ltrace_active ("pk_created"))
printf ("\nPk Created: objid (%d), time (%g)\n", op_id_self (), op_sim_time ());
-----------------------------------------------------------------------------------
ODB> mltrace pksw1.node_1.proc pk_created
Added trace #0: “trace on label (pk_created) in module (top.pksw1.node_1.proc)”
ODB> status
Breakpoints :
0) stop at time (75) sec.
Traces :
Full trace is disabled
Encapsulation trace is enabled
Execution trace is disabled
Trace format: indented
0) trace on label (pk_created) in module (top.pksw1.node_1.proc)
Actions :
None
Miscellaneous :
Memory tagging is disabled
ODB> cont
__________________________ (ODB 18.6.0: Event) ____________________________
* Time : 9.55254459034 sec, [9s . 552ms 544us 590ns 342ps]
* Event : execution ID (123), schedule ID (#141), type (stream intrpt)
* Source : execution ID (122), top.pksw1.node1.src (processor)
* Data : instrm (1), packet ID (12)
> Module : top.pksw1.node_1.proc [Objid=23] (processor) [process id: 94]
Pk Created: objid (63), time (9.55254)
. . .