Reference

Usage

To initiate tracing, type the following:

xbootmgr -trace boot|hibernate|standby|shutdown|rebootCycle [options]

To abort tracing and reset any prior configurations, type the following:

xbootmgr -remove

Tracing Options

The following table lists the options that can be used with the On/Off Transition Trace Capture tool.

Option Description

-numRuns [num]

Defines the number of test runs. Three or more (preferably ten) traces are required to collect data that is statistically significant.

Default:1

-resultPath [path]

Defines the path where the trace results should be stored.

Default:The current directory.

-traceFlags [flags]

Specifies the trace flags to use. For a full list of possible flags, see later in this table or type the following at the command prompt:

xperf -providers k

Default: BASE+CSWITCH

-callBack [cmd]

Specifies the file that is launched via ShellExecute after all trace runs are complete. This option is used when constructing an automation harness.

Default: No callback.

-runTag [tag]

Specifies a text string that is inserted into the trace file name and provides a quick and easy way to differentiate between different traces.

Example:

To quickly create two traces with "before" and "after" as part of the file name, type:

xbootmgr -trace rebootCycle -runtag before

Followed by:

xbootmgr -trace rebootCycle -runtag after

Default:None.

-prepSystem

Optimizes the computer before the trace begins to create an idealized set of results. This option applies only to boot/rebootCycle traces.

Default: Off.

-postBootDelay [sec]

For boot traces, sets the post-boot delay (in seconds) before stopping the trace.

For shutdown traces, sets the post-boot delay (in seconds) before shutting the system down to begin the trace.

For standby/hibernate traces, sets the post-resume delay (in seconds) before stopping the trace.

For reboot cycle, sets the post-boot delay (in seconds) before stopping the trace.

In general, this value should not be changed because reducing it undermines the post-boot calculations that Xperf.exe performs.

Default:120 seconds.

-wakeupDelay   [sec]

During a standby/hibernate trace, sets the delay for waking the machine from a sleep state (in seconds). If the test computer takes more than 60 seconds to achieve the sleep state, this value might need to be increased.

Default: 60 seconds.

-issueFlush

No longer required.

Default: Off.

-sleeperCmd [cmd]

No longer required.

Default: XbootmgrSleep.exe.

-preTraceCmd [cmd]

Specifies the file that is launched via ShellExecute before every trace iteration. This option can be used as part of an automation harness to collect additional pretrace state information during multiple traces.

Default:None.

-stackWalk

Specifies the stackwalk filters to be used, in one of the following ways:

An immediate list of flags, for example:

xperfmgr -trace boot -stackwalk ProcessCreate+CSwitch

A list of one of more filters stored in a file, for example:

xperfmgr -trace boot -stackwalk @stack.txt

For a list of possible stackwalk filters, see later in this table or type the following at a command prompt:

xperf -help stackwalk

Default:No filter enabled.

-noPopups

If an error occurs during the trace, returns the error code to the command line, rather than opening a message box. This option prevents an error from breaking an automated test procedure. Automation harnesses can also process the Xbootmgr.log file, which is automatically created and appended to the results directory, to check for errors.

Default: An error opens a message box.

-noPrepReboot

Prevents a preparatory reboot during a shutdown/rebootCycle trace. Usually, the reboot is required to ensure a consistent machine state before the first shutdown if multiple traces are being taken (c.f. -numRuns).

This option can be used to quickly capture a single trace.

Default: A preparatory reboot for shutdown/rebootCycle traces is performed.

-leavePremerged

Retains the premerged trace files, for debugging purposes.

Default:The premerge files are deleted.

-noTraceFlagslnFileName

When specified, prevents the output file names from containing trace flag names, for example, BASE.

Default: Output file names contain trace flags.

-verboseReadyBoot

Saves verbose status information for ReadyBoot prefetching.

Default: Off. Only minimal prefetching information is saved.

 

Trace Flags

The following table lists the flags that can be used with the -traceFlags option.

Kernel flags Descriptions

PROC_THREAD

Process and thread create/delete

LOADER

Kernel- and user-mode image load/unload events

PROFILE

CPU sample profile

CSWITCH

Context switch

COMPACT_CSWITCH

Compact context switch

DISPATCHER

CPU scheduler

DPC

Deferred procedure call (DPC)events

INTERRUPT

Interrupt events

SYSCALL

System calls

PRIORITY

Priority change events

ALPC

Advanced local procedure call

PERF_COUNTER

Process perf counters

DISK_IO

Disk I/O

DISK_IO_INIT

Disk I/O initiation

FILE_IO

File system operation end times and results

FILE_IO_INIT

File system operation (create/open/close/read/write)

HARD_FAULTS

Hard page faults

FILENAME

FileName (for example, FileName create/delete/rundown)

SPLIT_IO

Split I/O

REGISTRY

Registry tracing

DRIVERS

Driver events

POWER

Power management events

NETWORKTRACE

Network events (for example, tcp/udp send/receive)

VIRT_ALLOC

Virtual allocation reserve and release

MEMINFO

Memory list information

ALL_FAULTS

All page faults including hard, copy on write, demand zero faults, and so on

 

Stackwalk Filters

The following table shows the filters that can be added to a trace by using the -stackwalk option.

Stackwalk filters

ProcessCreate

RegCloseKey

ProcessDelete

HardFault

ImageLoad

PagefaultTransition

ImageUnload

PagefaultDemandZero

ThreadCreate

PagefaultCopyOnWrite

ThreadDelete

PagefaultGuard

CSwitch

PagefaultHard

ReadyThread

PagefaultAV

ThreadSetPriority

VirtualAlloc

ThreadSetBasePriority

VirtualFree

Mark

PagefileBackedImageMapping

SyscallEnter

HeapRangeCreate

SyscallExit

HeapRangeReserve

Profile

HeapRangeRelease

ProfileSetInterval

HeapRangeDestroy

DiskReadInit

HeapCreate

DiskWriteInit

HeapAlloc

DiskFlushInit

HeapRealloc

FileCreate

HeapFree

FileCleanup

HeapDestroy

FileClose

AlpcSendMessage

FileRead

AlpcReceiveMessage

FileWrite

AlpcWaitForReply

FileSetInformation

AlpcWaitForNewMessage

FileDelete

AlpcUnwait

FileRename

ThreadPoolCallbackEnqueue

FileDirEnum

ThreadPoolCallbackDequeue

FileFlush

ThreadPoolCallbackStart

FileQueryInformation

ThreadPoolCallbackStop

FileFSCTL

ThreadPoolCallbackCancel

FileDirNotify

ThreadPoolCreate

FileOpEnd

ThreadPoolClose

SplitIO

ThreadPoolSetMinThreads

RegQueryKey

ThreadPoolSetMaxThreads

RegEnumerateKey

PowerSetPowerAction

RegEnumerateValueKey

PowerSetPowerActionReturn

RegDeleteKey

PowerSetDevicesState

RegCreateKey

PowerSetDevicesStateReturn

RegOpenKey

PowerDeviceNotify

RegSetValue

PowerDeviceNotifyComplete

RegDeleteValue

PowerSessionCallout

RegQueryValue

PowerSessionCalloutReturn

RegQueryMultipleValue

PowerPreSleep

RegSetInformation

PowerPostSleep

RegFlush

PowerPerfStateChange

RegKcbCreate

PowerThermalConstraint

RegKcbDelete

PowerIdleStateChange

RegVirtualize

CritSecCollision

RegCloseKey

 

Resources

Windows Performance Toolkit (v.4.6)

 

 

Send comments about this topic to Microsoft

Build date: 5/5/2012