Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1996 Intel Corporation
  3. Module Name:
  4. ktrace.h
  5. Abstract:
  6. This module is an include file for use by all clients of the
  7. KTrace utility.
  8. By default, all kernel modules which have this module automatically
  9. included since an include for this file will exist in kx<arch>.h
  10. Author:
  11. Roy D'Souza (rdsouza@gomez) 22-April-1996
  12. Environment:
  13. User or Kernel mode.
  14. Revision History:
  15. --*/
  16. #ifndef _KTRACE_H_
  17. #define _KTRACE_H_
  18. /***********************************************************************
  19. Message Types:
  20. ***********************************************************************/
  21. #define MESSAGE_INFORMATION 0x1
  22. #define MESSAGE_WARNING 0x2
  23. #define MESSAGE_ERROR 0x4
  24. /***********************************************************************
  25. Module IDs:
  26. ***********************************************************************/
  27. #define MODULE_INIT 0x1
  28. #define MODULE_KE 0x2
  29. #define MODULE_EX 0x4
  30. #define MODULE_MM 0x8
  31. #define MODULE_LPC 0x10
  32. #define MODULE_SE 0x20
  33. #define MODULE_TDI 0x40
  34. #define MODULE_RTL 0x80
  35. #define MODULE_PO 0x100
  36. #define MODULE_PNP 0x200
  37. #define DRIVER_1 0x10000000
  38. #define DRIVER_2 0x20000000
  39. #define DRIVER_3 0x40000000
  40. #define DRIVER_4 0x80000000
  41. /***********************************************************************
  42. Prototypes:
  43. ***********************************************************************/
  44. //
  45. // Add an entry. Routine will determine current processor.
  46. //
  47. #if DBG
  48. NTSTATUS
  49. KeAddKTrace (
  50. ULONG ModuleID,
  51. USHORT MessageType,
  52. USHORT MessageIndex,
  53. ULONGLONG Arg1,
  54. ULONGLONG Arg2,
  55. ULONGLONG Arg3,
  56. ULONGLONG Arg4
  57. );
  58. #else
  59. #define KeAddKTrace
  60. #endif
  61. //
  62. // Selectively dump trace.
  63. //
  64. #if DBG
  65. ULONG
  66. __stdcall
  67. KeDumpKTrace (
  68. ULONG ProcessorNumber,
  69. ULONG StartEntry,
  70. ULONG NumberOfEntries,
  71. ULONGLONG ModuleFilter,
  72. ULONGLONG MessageFilter,
  73. BOOLEAN Sort);
  74. #else
  75. #define KeDumpKTrace
  76. #endif
  77. //
  78. // Selectively permit kernel modules to write to trace.
  79. //
  80. #if DBG
  81. VOID
  82. __stdcall
  83. KeEnableKTrace (
  84. ULONG IDMask
  85. );
  86. #else
  87. #define KeEnableKTrace
  88. #endif
  89. #if DBG
  90. VOID
  91. NTAPI // __stdcall
  92. DumpRecord (IN ULONG ProcessorNumber,
  93. IN ULONG Index);
  94. #else
  95. #define DumpRecord
  96. #endif
  97. #endif // _KTRACE_H_