ReactOS  0.4.15-dev-2721-g5912c11
fxifr.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxIFR.h
8 
9 Abstract:
10 
11  This module contains the private IFR tracing definitions
12  The structures are common to the In-Flight Recorder (IFR)
13  and the IFR-related debug commands in wdfkd.dll.
14 
15 Environment:
16 
17  kernel mode and debug extensions
18 
19 Revision History:
20 
21 
22 --*/
23 
24 #ifndef _FXIFR_H
25 #define _FXIFR_H
26 
27 //
28 // This is maximum number of arguments a single message can capture.
29 // It reflects WPP_MAX_MOF_FIELDS value of 8 found in WPP trace support.
30 //
31 #define WDF_MAX_LOG_FIELDS (8)
32 
33 //
34 // This is the longest allowable message retained in the IFR log.
35 //
36 #define WDF_MAX_IFR_MESSAGE_SIZE (256)
37 
38 
39 //
40 // This is the maximum name length for the driver.
41 //
42 #define WDF_IFR_HEADER_NAME_LEN (32)
43 
44 //
45 // Access macro for trace GUID BITs.
46 //
47 #define TRACE_BIT(a) WPP_BIT_ ## a
48 
49 //
50 // Various GUIDs needed.
51 //
52 
53 //
54 // (Keep synch-ed with "KmdfTraceGuid" in fxtrace.h)
55 //
56 DEFINE_GUID (WdfTraceGuid,
57  0x544d4c9d, 0x942c, 0x46d5, 0xbf, 0x50, 0xdf, 0x5c, 0xd9, 0x52, 0x4a, 0x50);
58 
59 //
60 // GUID used to tag IFR log in crash dump.
61 //
62 DEFINE_GUID (WdfDumpGuid,
63  0x54c84888, 0x01d1, 0x4c1e, 0xbe, 0xd6, 0x28, 0x2c, 0x98, 0x24, 0x13, 0x03);
64 
65 //
66 // GUID used to tag drivers info in crash dump.
67 //
68 // {F87E4A4C-C5A1-4d2f-BFF0-D5DE63A5E4C3}
69 DEFINE_GUID(WdfDumpGuid2,
70 0xf87e4a4c, 0xc5a1, 0x4d2f, 0xbf, 0xf0, 0xd5, 0xde, 0x63, 0xa5, 0xe4, 0xc3);
71 
72 //
73 // This structure hold the current and previous 16-bit offsets into
74 // the IFR log. These variable must be access together as a LONG
75 // via the InterlockedCompareExchange().
76 //
77 typedef struct _WDF_IFR_OFFSET {
78  union {
79  struct {
82  } s;
84  } u;
86 
87 
88 #define WDF_IFR_LOG_TAG 'gLxF' // 'FxLg'
89 
90 //
91 // This is the IFR log header structure. It is immediately followed
92 // by the log area itself.
93 //
94 typedef struct _WDF_IFR_HEADER {
95 
96  GUID Guid; // WDF's GUID (WDF_TRACE_GUID)
97  PUCHAR Base; // log data area base (not header)
98  ULONG Size; // size of the log (1 page by default)
99  WDF_IFR_OFFSET Offset; // current/previous offsets
100  LONG Sequence; // local sequence number
101 #if (FX_CORE_MODE == FX_CORE_USER_MODE)
102  PLONG SequenceNumberPointer; // Global IFR Sequence Number
103 #endif
105 
107 
108 
109 #define WDF_IFR_RECORD_SIGNATURE 'RL' // 'LR'
110 
111 typedef struct _WDF_IFR_RECORD {
112 
113  USHORT Signature; // 'LR' Log Record signature
116  USHORT PrevOffset; // offset to previous record
117  USHORT MessageNumber; // message number see <GUID>.tmf
118  GUID MessageGuid; // message GUID see <GUID>.tmf
119 
121 
122 
123 #endif // _FXIFR_H
LONG AsLONG
Definition: fxifr.h:83
LONG Sequence
Definition: fxifr.h:100
PLONG SequenceNumberPointer
Definition: fxifr.h:102
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
PUCHAR Base
Definition: fxifr.h:97
DEFINE_GUID(WdfTraceGuid, 0x544d4c9d, 0x942c, 0x46d5, 0xbf, 0x50, 0xdf, 0x5c, 0xd9, 0x52, 0x4a, 0x50)
USHORT Length
Definition: fxifr.h:114
struct _WDF_IFR_HEADER WDF_IFR_HEADER
USHORT Current
Definition: fxifr.h:80
long LONG
Definition: pedump.c:60
GUID Guid
Definition: fxifr.h:96
struct _WDF_IFR_OFFSET WDF_IFR_OFFSET
struct _WDF_IFR_OFFSET * PWDF_IFR_OFFSET
CHAR DriverName[WDF_IFR_HEADER_NAME_LEN]
Definition: fxifr.h:104
struct _WDF_IFR_OFFSET::@4553::@4554 s
struct _WDF_IFR_HEADER * PWDF_IFR_HEADER
LONG Sequence
Definition: fxifr.h:115
USHORT PrevOffset
Definition: fxifr.h:116
struct _WDF_IFR_RECORD * PWDF_IFR_RECORD
#define WDF_IFR_HEADER_NAME_LEN
Definition: fxifr.h:42
WDF_IFR_OFFSET Offset
Definition: fxifr.h:99
USHORT Signature
Definition: fxifr.h:113
USHORT MessageNumber
Definition: fxifr.h:117
struct _WDF_IFR_RECORD WDF_IFR_RECORD
unsigned short USHORT
Definition: pedump.c:61
GUID MessageGuid
Definition: fxifr.h:118
union _WDF_IFR_OFFSET::@4553 u
ULONG Size
Definition: fxifr.h:98
unsigned int ULONG
Definition: retypes.h:1
signed int * PLONG
Definition: retypes.h:5
USHORT Previous
Definition: fxifr.h:81