perflog.h 1.2 KB

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