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.

46 lines
1.0 KiB

  1. //
  2. // tracelog.h
  3. //
  4. // Copyright (c) 1996 FORE Systems, Inc.
  5. // All rights reserved.
  6. //
  7. // THIS SOURCE CODE CONTAINS CONFIDENTIAL INFORMATION THAT IS OWNED BY FORE
  8. // SYSTEMS, INC. AND MAY NOT BE COPIED, DISCLOSED OR OTHERWISE USED WITHOUT
  9. // THE EXPRESS WRITTEN CONSENT OF FORE SYSTEMS, INC.
  10. //
  11. #ifndef _FORE_TRACELOG_H_
  12. #define _FORE_TRACELOG_H_
  13. #define MAX_TRACELOG_PARAMS 8
  14. #define TL_GET_PARAM_COUNT(eid) ((eid)&0xF)
  15. #define TL_GET_EVENT(eid) ((eid)>>4)
  16. #define TL_BUILD_EVENT_ID(ev,p) (((ev)<<4)|((p)&0xF))
  17. typedef struct _TraceEntry
  18. {
  19. unsigned long EventId;
  20. unsigned long Time;
  21. unsigned long Params[MAX_TRACELOG_PARAMS];
  22. } TRACEENTRY, *PTRACEENTRY;
  23. typedef struct _TraceLog
  24. {
  25. unsigned char *Storage;
  26. unsigned long StorageSizeBytes;
  27. PTRACEENTRY First;
  28. PTRACEENTRY Last;
  29. PTRACEENTRY Current;
  30. } TRACELOG, *PTRACELOG;
  31. extern void
  32. InitTraceLog(PTRACELOG TraceLog, unsigned char *Storage,
  33. unsigned long StorageSizeBytes);
  34. extern void
  35. TraceLogWrite(PTRACELOG TraceLog, unsigned long EventId, ...);
  36. #endif // _FORE_TRACELOG_H_