mtrace subcommand
The mtrace subcommand displays information about the Lightweight Memory Trace (LMT).
Format
mtrace [ -C [ CPU_list | all ] [ -d addr [, size ] ] ] [-t TID ] [ -j Event [, Event ] ] [ -v ] [ rare | common | all ]
Parameters
Item | Description |
---|---|
-C [ CPU_list | all ] | Specifies the logical IDs of processors in decimal format. The CPU_list parameter is a comma-separated list of logical processor IDs. The keyword all is used to identify all active processors. If the mtrace command requires specified processors and none is provided, -C all is assumed. |
-d addr [, size ] | Specifies the memory trace buffer address and size. |
-t TID | Specifies a thread ID filter. A thread is identified by its thread ID in hexadecimal format. When the mtrace command is used to display buffer contents, this parameter is used to display only LMT events related to the specified thread. Otherwise, this parameter is not valid. |
-j Event [, Event ] | Specifies a hook ID filter. Identify a hook by its hook ID in hexadecimal format. When you use the mtrace subcommand to display buffer contents, this parameter displays events for the hook IDs that you specify. If you use this parameter, you must specify at least one event ID. You can specify a maximum of 128 hooks. You can specify hook IDs as either three or four hexadecimal digits. Specifying three hexadecimal digits indicates a hook ID of the form 0xhhh0. Specifying four hexadecimal digits indicates a hook ID of the form 0xhhhh. |
-v | Displays events using a verbose output format. This option is only valid when the mtrace command is used to display buffer contents. |
rare | common | all | Specifies the buffer types to be displayed. |
If LMT is in disabled mode, only general LMT information can be displayed. If the kdb command is invoked on a live kernel, trace events in buffers cannot be displayed.
If no options are specified, the mtrace command displays general information about LMT (the contents of the mtrc structure).
If the -C parameter is specified with a single processor and no buffer type, information for the common and rare buffer types on the specified processor is provided.
If the -C parameter is specified with one or more processors and a buffer type, trace events recorded in the specified buffer of the specified processors are displayed, with the most recent events displayed first.
If the -d parameter is specified, trace events recorded in the buffer at the specified address and of the specified size are displayed. Use the -d parameter to display memory trace events saved in the dmp_minimal area of a system dump.
The default trace entry output format is a simplified and short view of the trace record. To view trace entries in a more verbose format, use the -v parameter.
Other
mtrc
Examples
The following example displays memory trace buffer information for processor 0 using the alias mtrc subcommand:
KDB(0)> mtrc -C 0
MTRC [COM] @ F10008000FF99040
mtq_start... F100011870000000
mtq_size.... 0000000000098000
mtq_inptr... F100011870064090
MTRC [RAR] @ F10008000FF99060
mtq_start... F100011896666000
mtq_size.... 0000000000065000
mtq_inptr... F100011896666630
The following example displays the trace event buffer for processor 0 in a verbose output format using the alias mtrc subcommand:
KDB(0)> mtrc -C 0 common -v
Display content of buffer: mtrcq @ F10008000FF99040
Current entry at @ F100011870064088
Hook ID: KERN_SLIH (00000102) Hook Type:
ThreadIdent: 00000205
Subhook ID/HookData: 0000
Data Length: 0008 bytes
D0: 0000000003EC2050 ................
Current entry at @ F100011870064068
Hook ID: KERN_FLIH (00000100) Hook Type: Timestamped
ThreadIdent: 00000205
Subhook ID/HookData: 0005
Data Length: 0028 bytes
D0: 000000000002E36C ................
D1: 0000000000000000 ................
D2: F00000002FF47600 ................
D3: 0000000000000000 ................
D4: 0000000000000000 ................
The following example merges and displays all entries using the alias mtrc subcommand:
KDB(0)> mtrc all
The following example displays events in both the common and rare buffer types on processor 0 and 3 with thread ID 1893 and hook 0x100, 0x200 and 0x3B7 using the alias mtrc subcommand:
KDB(0)> mtrc -C 0,3 -t 1893 -j 100,200,3B7 all
The following example displays summary information:
KDB(0)> mtrc
MTRC @ 00000000011732B8
mt_magic.......... ....mtrc
mt_state.......... 00000000 ENABLED
mt_flags.......... 00000000
mt_lock .........@ 0FFFFFFFFFFFC160 00000000
mt_bufsize...[COM] 0000000000098000
mt_bufsize...[RAR] 0000000000065000
mt_reqbufsize[COM] FFFFFFFFFFFFFFFF
mt_reqbufsize[RAR] FFFFFFFFFFFFFFFF
mt_cdtsize........ 00000000007E8278
mt_cdt...........@ F100080010546000
mt_wait........... FFFFFFFFFFFFFFFF