AutoLogger can turn on heap tracing at boot time. When AutoLogger is used in conjunction with WPA On/Off Transition Trace Capture, also referred to as xbootmgr, information can be collected during the on/off transition phases of the operating system.

The accompanying example shows how to set the appropriate registry values.

Windows Registry Editor Version 5.00


; NOTE: You might think the Guid could be any value to identify the session uniquely, 
; but in order to turn on heap tracing it *MUST* be the HeapGuid,


; See etw\tracesub.c, ValidModeMask for a list of all valid bits.
;// Logger Mode flags
;#define EVENT_TRACE_FILE_MODE_NONE          0x00000000  // Logfile is off
;#define EVENT_TRACE_FILE_MODE_SEQUENTIAL    0x00000001  // Log sequentially
;#define EVENT_TRACE_FILE_MODE_CIRCULAR      0x00000002  // Log in circular manner
;#define EVENT_TRACE_FILE_MODE_APPEND        0x00000004  // Append sequential log
;#define EVENT_TRACE_REAL_TIME_MODE          0x00000100  // Real time mode on
;#define EVENT_TRACE_DELAY_OPEN_FILE_MODE    0x00000200  // Delay opening file
;#define EVENT_TRACE_BUFFERING_MODE          0x00000400  // Buffering mode only
;#define EVENT_TRACE_PRIVATE_LOGGER_MODE     0x00000800  // Process Private Logger
;#define EVENT_TRACE_ADD_HEADER_MODE         0x00001000  // Add a logfile header
;#define EVENT_TRACE_USE_GLOBAL_SEQUENCE     0x00004000  // Use global sequence no.
;#define EVENT_TRACE_USE_LOCAL_SEQUENCE      0x00008000  // Use local sequence no.
;#define EVENT_TRACE_RELOG_MODE              0x00010000  // Relogger
;#define EVENT_TRACE_USE_PAGED_MEMORY        0x01000000  // Use pageable buffers
; Setting it to sequential is sufficient - EVENT_TRACE_DELAY_OPEN_FILE_MODE and EVENT_TRACE_ADD_HEADER_MODE are not needed.
;0x00000001  // Log sequentially

; 64KB * 0x0400 =  64 MB
; 64KB * 0x1000 = 256 MB

; Max file size in MB.
; Default (if we leave absent) is 100 (MB) and after that the trace session is shut down.  That will cause xperf to fail when trying to merge.
; If we leave it blank, then "xperf -loggers" shows it set to 100.
; Set to 0 for no limit.  

; This value copied from GlobalLogger, where it was set based on -stackwalk VirtualAlloc+HeapCreate+HeapAlloc+HeapRealloc

; NOTE: There are no guids below this.
; We accomplish the goal of heap logging by using the HeapGuid as the session instance guid.
; [end]



Send comments about this topic to Microsoft

Build date: 5/5/2012