proltrace
Abstract
Sets a labeled trace for the specified process. Invocations of the KP op_prg_odb_ltrace_active() by the specified process will return 1 if passed a label argument that matches the trace. This KP can be used to enable user-defined diagnostic messages or other actions.
Syntax
proltrace <process_id> [<label>]
| Argument | Type | Description |
|---|---|---|
<process_id> |
integer | numeric process ID of the process-of-interest A process ID can be obtained by using the ODB commands objprint or promap, which both display lists of the existing processes associated with a specific module. |
<label> |
string | [optional] one or more space-separated strings specifying which labels in the process to trace Each label can include alphanumeric characters, spaces, and selected punctuation, but must be surrounded by double quotes if spaces are included. If no label is given in the command, proltrace displays a list of the labels found in the process model.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
Kernel Procedure trace messages are not issued by labeled traces. An event that directly or indirectly leads to the invocation of a traced process which invokes 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
For this example, the following lines of code must be added in the else clause starting on line 9 of the route_pk state enter execs in process model pksw_hub_proc.
if (op_prg_odb_ltrace_active ("xroute"))
printf ("\n** cross route (%d) -> (%d) **\n", subnet_id, dest_subnet);
----------------------------------------------------------------------------------
ODB> proltrace 5
Following ODB labels are available for the process [5]: xroute
ODB> proltrace 5 xroute
Added trace #0: trace on label (xroute) in process (5)
ODB> cont
__________________________ (ODB 18.6.0: Event) ____________________________
* Time : 3.37121714973 sec, [3s . 371ms 217us 149ns 731ps]
* Event : execution ID (59), schedule ID (#71), type (stream intrpt)
* Source : execution ID (58), top.pksw2.hub.rcv1 (pt-pt receiver)
* Data : instrm (1), packet ID (4)
> Module : top.pksw2.hub.hub [Objid=180] (processor) [process id: 76]
** cross route (2) -> (1) **
__________________________ (ODB 18.6.0: Event) ____________________________
* Time : 4.66310754514 sec, [4s . 663ms 107us 545ns 137ps]
* Event : execution ID (79), schedule ID (#91), type (stream intrpt)
* Source : execution ID (75), top.pksw2.hub.rcv2 (pt-pt receiver)
* Data : instrm (2), packet ID (5)
> Module : top.pksw2.hub.hub [Objid=180] (processor) [process id: 76]
** cross route (2) -> (1) **
...