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.

61 lines
1.3 KiB

  1. //------------------------------------------------------------------------------
  2. // File: perflog.h
  3. //
  4. // Desc: Performance logging framework.
  5. //
  6. //@@BEGIN_MSINTERNAL
  7. //
  8. // 25-Oct-2000 ArthurZ Created.
  9. //
  10. //@@END_MSINTERNAL
  11. // Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
  12. //------------------------------------------------------------------------------
  13. typedef struct _PERFLOG_LOGGING_PARAMS {
  14. GUID ControlGuid;
  15. void (*OnStateChanged)(void);
  16. ULONG NumberOfTraceGuids;
  17. TRACE_GUID_REGISTRATION TraceGuids[ANYSIZE_ARRAY];
  18. } PERFLOG_LOGGING_PARAMS, *PPERFLOG_LOGGING_PARAMS;
  19. BOOL
  20. PerflogInitIfEnabled(
  21. IN HINSTANCE hInstance,
  22. IN PPERFLOG_LOGGING_PARAMS LogParams
  23. );
  24. BOOL
  25. PerflogInitialize (
  26. IN PPERFLOG_LOGGING_PARAMS LogParams
  27. );
  28. VOID
  29. PerflogShutdown (
  30. VOID
  31. );
  32. VOID
  33. PerflogTraceEvent (
  34. PEVENT_TRACE_HEADER Event
  35. );
  36. extern ULONG PerflogEnableFlags;
  37. extern UCHAR PerflogEnableLevel;
  38. extern ULONG PerflogModuleLevel;
  39. extern TRACEHANDLE PerflogTraceHandle;
  40. extern TRACEHANDLE PerflogRegHandle;
  41. #define PerflogTracingEnabled() (PerflogTraceHandle != 0)
  42. #define PerflogEvent( _x_ ) PerflogTraceEventLevel _x_
  43. VOID
  44. PerflogTraceEventLevel(
  45. ULONG Level,
  46. PEVENT_TRACE_HEADER Event
  47. );
  48. VOID
  49. PerflogTraceEvent (
  50. PEVENT_TRACE_HEADER Event
  51. );