.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "xentrace 8" .TH xentrace 8 2024-02-04 4.17.4-pre Xen .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME xentrace \- capture Xen trace buffer data .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBxentrace\fR [ \fIOPTIONS\fR ] [ \fIFILE\fR ] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBxentrace\fR is used to capture trace buffer data from Xen. The data is output in the following binary format (host endian): .PP .Vb 1 \& CPU(uint) TSC(u64) EVENT(u32) D1 D2 D3 D4 D5 (all u32) .Ve .PP Where CPU is the processor number, TSC is the record's timestamp (the value of the CPU cycle counter), EVENT is the event ID and D1...D5 are the trace data. .PP Data is dumped onto the standard output (which must not be a TTY) or a \&\fIFILE\fR specified on the command line. .PP The output should be parsed using the tool xentrace_format, which can produce human-readable output in ASCII format. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-t\fR \fIl\fR, \fB\-\-log\-thresh\fR=\fIl\fR" 4 .IX Item "-t l, --log-thresh=l" set the threshold number, \fIl\fR, of new records required to trigger a write of all new records to the output .IP "\fB\-s\fR \fIp\fR, \fB\-\-poll\-sleep\fR=\fIp\fR" 4 .IX Item "-s p, --poll-sleep=p" set the time, \fIp\fR, (in milliseconds) to sleep between polling the buffers for new data. .IP "\fB\-c\fR [\fIc\fR|\fICPU-LIST\fR|\fIall\fR], \fB\-\-cpu\-mask\fR=[\fIc\fR|\fICPU-LIST\fR|\fIall\fR]" 4 .IX Item "-c [c|CPU-LIST|all], --cpu-mask=[c|CPU-LIST|all]" This can be: a hex value (of the form 0xNNNN...), or a set of cpu ranges as described below, or the string \fIall\fR. Hex values are limited to 32 bits. If not specified, the cpu-mask as set during bootup will be constructed. If using the \fICPU-LIST\fR it expects decimal numbers, which may be specified as follows: .Sp .Vb 2 \& "0\-3" \& Trace only on CPUs 0 through 3 \& \& "0,2,5\-7" \& Trace only on CPUs 0, 2, and 5 through 7 \& \& "\-3" \& Trace only on CPUs 0 through 3 \& \& "\-3,7" \& Trace only on CPUs 0 through 3 and 7 \& \& "3\-" \& Trace only on CPUs 3 up to maximum numbers of CPUs the host has .Ve .Sp If using \fIall\fR it will use all of the CPUs the host has. .IP "\fB\-e\fR \fImask\fR, \fB\-\-evt\-mask\fR=\fImask\fR" 4 .IX Item "-e mask, --evt-mask=mask" set event capture mask. If not specified the TRC_ALL will be used. .IP "\fB\-?\fR, \fB\-\-help\fR" 4 .IX Item "-?, --help" Give this help list .IP \fB\-\-usage\fR 4 .IX Item "--usage" Give a short usage message .IP "\fB\-V\fR, \fB\-\-version\fR" 4 .IX Item "-V, --version" Print program version .SS "Event Classes (Masks)" .IX Subsection "Event Classes (Masks)" The following event classes (masks) can be used to filter the events being gathered by xentrace: .PP .Vb 1 \& ID Description \& \& 0x0001f000 TRC_GEN \& 0x0002f000 TRC_SCHED \& 0x0004f000 TRC_DOM0OP \& 0x0008f000 TRC_HVM \& 0x0010f000 TRC_MEM \& 0xfffff000 TRC_ALL .Ve .SS "Event Subclasses (More Masks)" .IX Subsection "Event Subclasses (More Masks)" The following event subclasses (masks) can also be used to filter the events being gathered by xentrace: .PP .Vb 1 \& ID Description \& \& 0x00081000 TRC_HVM_ENTRYEXIT \& 0x00082000 TRC_HVM_HANDLER .Ve .SS Events .IX Subsection "Events" \&\fBxentrace\fR collects the following events from the trace buffer: .PP .Vb 1 \& ID Description \& \& 0x0001f001 TRC_LOST_RECORDS \& 0x0002f001 TRC_SCHED_DOM_ADD \& 0x0002f002 TRC_SCHED_DOM_REM \& 0x0002f003 TRC_SCHED_SLEEP \& 0x0002f004 TRC_SCHED_WAKE \& 0x0002f005 TRC_SCHED_YIELD \& 0x0002f006 TRC_SCHED_BLOCK \& 0x0002f007 TRC_SCHED_SHUTDOWN \& 0x0002f008 TRC_SCHED_CTL \& 0x0002f009 TRC_SCHED_ADJDOM \& 0x0002f010 TRC_SCHED_SWITCH \& 0x0002f011 TRC_SCHED_S_TIMER_FN \& 0x0002f012 TRC_SCHED_T_TIMER_FN \& 0x0002f013 TRC_SCHED_DOM_TIMER_FN \& 0x0002f014 TRC_SCHED_SWITCH_INFPREV \& 0x0002f015 TRC_SCHED_SWITCH_INFNEXT \& \& 0x00081001 TRC_HVM_VMENTRY \& 0x00081002 TRC_HVM_VMEXIT \& 0x00082001 TRC_HVM_PF_XEN \& 0x00082002 TRC_HVM_PF_INJECT \& 0x00082003 TRC_HVM_INJ_EXC \& 0x00082004 TRC_HVM_INJ_VIRQ \& 0x00082005 TRC_HVM_REINJ_VIRQ \& 0x00082006 TRC_HVM_IO_READ \& 0x00082007 TRC_HVM_IO_WRITE \& 0x00082008 TRC_HVM_CR_READ \& 0x00082009 TRC_HVM_CR_WRITE \& 0x0008200A TRC_HVM_DR_READ \& 0x0008200B TRC_HVM_DR_WRITE \& 0x0008200C TRC_HVM_MSR_READ \& 0x0008200D TRC_HVM_MSR_WRITE \& 0x0008200E TRC_HVM_CPUID \& 0x0008200F TRC_HVM_INTR \& 0x00082010 TRC_HVM_NMI \& 0x00082011 TRC_HVM_SMI \& 0x00082012 TRC_HVM_VMMCALL \& 0x00082013 TRC_HVM_HLT \& 0x00082014 TRC_HVM_INVLPG \& \& 0x0010f001 TRC_MEM_PAGE_GRANT_MAP \& 0x0010f002 TRC_MEM_PAGE_GRANT_UNMAP \& 0x0010f003 TRC_MEM_PAGE_GRANT_TRANSFER .Ve .SH AUTHOR .IX Header "AUTHOR" Mark A. Williamson .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBxentrace_format\fR\|(1)