xentrace(8)
π xentrace(8) β the Xen trace buffer capture girlie
okay so bestie, this is the manual page for xentrace(8) from the Xen crew, and i'm gonna walk you through it like we're texting at 2am π«Ά
β¨ NAME β¨
xentrace β capture Xen trace buffer data. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
xentrace [ OPTIONS ] [ FILE ]
π¦ DESCRIPTION π¦
okay so xentrace is literally the tool you use to capture trace buffer data from Xen. and the data comes out in this binary format (host endian, no cap):
CPU(uint) TSC(u64) EVENT(u32) D1 D2 D3 D4 D5 (all u32)
where:
CPUis the processor numberTSCis the record's timestamp (aka the value of the CPU cycle counter) β±οΈEVENTis the event IDD1...D5are the trace data
so where does it all go? the data is dumped onto the standard output β and heads up, that must not be a TTY π« β or onto a FILE you specify on the command line.
and like, the output should be parsed using the toolxenalyze, which can produce human-readable output in ASCII format. soxentraceis the raw-capture main character,xenalyzeis the one who makes it make sense β¨
π OPTIONS π
-t l,--log-thresh=lβ set the threshold number,l, of new records required to trigger a write of all new records to the output π-s p,--poll-sleep=pβ set the time,p, (in milliseconds) to sleep between polling the buffers for new data π΄-c [c|CPU-LIST|all],--cpu-mask=[c|CPU-LIST|all]β pick which CPUs you're tracing, bestie. this can be: a hex value (of the form0xNNNN...), or a set of cpu ranges as described below, or the stringall. hex values are limited to 32 bits. if you don't specify it, the cpu-mask as set during bootup will be constructed. if you're using the CPU-LIST it expects decimal numbers, which may be specified as follows:"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
and if you use all it will use all of the CPUs the host has π―
-e mask,--evt-mask=maskβ set event capture mask. if you don't specify it,TRC_ALLwill be used π-?,--helpβ give a short usage message π₯Ί-V,--versionβ print program version π
π Event Classes (Masks) π
these are the event classes (masks) you can use to filter the events being gathered by xentrace, and honestly they're giving selector-menu energy:
0x0001f000βTRC_GEN0x0002f000βTRC_SCHED0x0004f000βTRC_DOM0OP0x0008f000βTRC_HVM0x0010f000βTRC_MEM0xfffff000βTRC_ALL
π§ Event Subclasses (More Masks) π§
and there's more filtering, because of course there is β these event subclasses (masks) can also be used to filter the events being gathered by xentrace:
0x00081000βTRC_HVM_ENTRYEXIT0x00082000βTRC_HVM_HANDLER
π₯ Events π₯
here's the full lineup of events xentrace collects from the trace buffer. literally iconic, i'm obsessed:
0x0001f001βTRC_LOST_RECORDS0x0002f001βTRC_SCHED_DOM_ADD0x0002f002βTRC_SCHED_DOM_REM0x0002f003βTRC_SCHED_SLEEP0x0002f004βTRC_SCHED_WAKE0x0002f005βTRC_SCHED_YIELD0x0002f006βTRC_SCHED_BLOCK0x0002f007βTRC_SCHED_SHUTDOWN0x0002f008βTRC_SCHED_CTL0x0002f009βTRC_SCHED_ADJDOM0x0002f010βTRC_SCHED_SWITCH0x0002f011βTRC_SCHED_S_TIMER_FN0x0002f012βTRC_SCHED_T_TIMER_FN0x0002f013βTRC_SCHED_DOM_TIMER_FN0x0002f014βTRC_SCHED_SWITCH_INFPREV0x0002f015βTRC_SCHED_SWITCH_INFNEXT
0x00081001βTRC_HVM_VMENTRY0x00081002βTRC_HVM_VMEXIT0x00082001βTRC_HVM_PF_XEN0x00082002βTRC_HVM_PF_INJECT0x00082003βTRC_HVM_INJ_EXC0x00082004βTRC_HVM_INJ_VIRQ0x00082005βTRC_HVM_REINJ_VIRQ0x00082006βTRC_HVM_IO_READ0x00082007βTRC_HVM_IO_WRITE0x00082008βTRC_HVM_CR_READ0x00082009βTRC_HVM_CR_WRITE0x0008200AβTRC_HVM_DR_READ0x0008200BβTRC_HVM_DR_WRITE0x0008200CβTRC_HVM_MSR_READ0x0008200DβTRC_HVM_MSR_WRITE0x0008200EβTRC_HVM_CPUID0x0008200FβTRC_HVM_INTR0x00082010βTRC_HVM_NMI0x00082011βTRC_HVM_SMI0x00082012βTRC_HVM_VMMCALL0x00082013βTRC_HVM_HLT0x00082014βTRC_HVM_INVLPG
0x0010f001βTRC_MEM_PAGE_GRANT_MAP0x0010f002βTRC_MEM_PAGE_GRANT_UNMAP0x0010f003βTRC_MEM_PAGE_GRANT_TRANSFER
πΊ AUTHOR πΊ
the one and only Mark A. Williamson <mark.a.williamson@intel.com> β ty for your service king π«‘π
and that's the whole page bestie!! π« this version is from the Xen 4.20.5-pre era, dated 2026-10-16, and it's the xentrace(8) page through and through. now go capture some trace buffer data, you gorgeous nerd π¦β¨π
π¦ where this page comes from
- debian trixie: xen-utils-common 4.20.4+39-gf1e1321c87-0+deb13u1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms