Leaked source code of windows server 2003
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.

123 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 2000-2002 Microsoft Corporation
  3. Module Name:
  4. uctrace.h
  5. Abstract:
  6. This module contains public declarations and definitions for tracing
  7. and debugging client code.
  8. Author:
  9. Rajesh Sundaram (rajeshsu) - 17th July 2001.
  10. Revision History:
  11. --*/
  12. #ifndef _UC_TRACE_H_
  13. #define _UC_TRACE_H_
  14. //
  15. // This defines the entry written to the trace log.
  16. //
  17. typedef struct _UC_TRACE_LOG_ENTRY
  18. {
  19. USHORT Action;
  20. USHORT Processor;
  21. PEPROCESS pProcess;
  22. PETHREAD pThread;
  23. PVOID pContext1;
  24. PVOID pContext2;
  25. PVOID pContext3;
  26. PVOID pContext4;
  27. PVOID pFileName;
  28. USHORT LineNumber;
  29. } UC_TRACE_LOG_ENTRY, *PUC_TRACE_LOG_ENTRY;
  30. //
  31. // Action codes.
  32. //
  33. // N.B. These codes must be contiguous, starting at zero. If you update
  34. // this list, you must also update the corresponding array in
  35. // ul\ulkd\filt.c.
  36. //
  37. #define UC_TRACE_LOG_SIGNATURE MAKE_SIGNATURE('UcLg')
  38. //
  39. // Manipulators.
  40. //
  41. PTRACE_LOG
  42. UcCreateTraceLog(
  43. IN LONG LogSize,
  44. IN LONG ExtraBytesInHeader
  45. );
  46. VOID
  47. UcDestroyTraceLog(
  48. IN PTRACE_LOG pLog
  49. );
  50. VOID
  51. UcWriteTraceLog(
  52. IN PTRACE_LOG pLog,
  53. IN USHORT Action,
  54. IN PVOID pContext1,
  55. IN PVOID pContext2,
  56. IN PVOID pContext3,
  57. IN PVOID pContext4,
  58. IN PVOID pFileName,
  59. IN USHORT LineNumber
  60. );
  61. #if DBG
  62. #define CREATE_UC_TRACE_LOG( ptr, size, extra ) \
  63. (ptr) = UcCreateTraceLog( (size), (extra) )
  64. #define DESTROY_UC_TRACE_LOG( ptr ) \
  65. do \
  66. { \
  67. UcDestroyTraceLog( ptr ); \
  68. (ptr) = NULL; \
  69. } while (FALSE, FALSE)
  70. #define UC_WRITE_TRACE_LOG( log, act, pcon, preq, pirp, status) \
  71. UcWriteTraceLog( \
  72. (log), \
  73. (act), \
  74. (PVOID)(pcon), \
  75. (PVOID)(preq), \
  76. (PVOID)(pirp), \
  77. (PVOID)(status), \
  78. __FILE__, \
  79. __LINE__ \
  80. )
  81. #else // !DBG
  82. #define CREATE_UC_TRACE_LOG( ptr, size, extra ) NOP_FUNCTION
  83. #define DESTROY_UC_TRACE_LOG( ptr ) NOP_FUNCTION
  84. #define UC_WRITE_TRACE_LOG( log, act, pcon, preq, pirp, status) NOP_FUNCTION
  85. #endif // !DBG
  86. #endif // _UC_TRACE_H_