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.

79 lines
1.8 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. perfutil.h
  5. Abstract:
  6. This file supports routines used to parse and
  7. create Performance Monitor Data Structures.
  8. It actually supports Performance Object types with
  9. multiple instances
  10. Author:
  11. Russ Blake 7/30/92
  12. Revision History:
  13. --*/
  14. #ifndef _PERFUTIL_H_
  15. #define _PERFUTIL_H_
  16. //
  17. // Utility macro. This is used to reserve a DWORD multiple of
  18. // bytes for Unicode strings embedded in the definitional data,
  19. // viz., object instance names.
  20. //
  21. // (assumes dword is 4 bytes)
  22. #define ALIGN_ON_DWORD(x) ((LPVOID) (((DWORD_PTR)(x) + 3) & ~3))
  23. #define DWORD_MULTIPLE(x) (((x) + 3) & ~3)
  24. #define CLEAR_FIRST_FOUR_BYTES(x) *(DWORD *)(x) = 0L
  25. // (assumes QuadWORD is 8 bytes)
  26. #define ALIGN_ON_QWORD(x) ((LPVOID) (((DWORD_PTR)(x) + 7) & ~7))
  27. #define QWORD_MULTIPLE(x) (((x) + 7) & ~7)
  28. #define CLEAR_FIRST_EIGHT_BYTES(x) *(LONGLONG *)(x) = 0L
  29. extern WCHAR GLOBAL_STRING[]; // Global command (get all local ctrs)
  30. extern WCHAR FOREIGN_STRING[]; // get data from foreign computers
  31. extern WCHAR COSTLY_STRING[];
  32. extern WCHAR NULL_STRING[];
  33. #define QUERY_GLOBAL 1
  34. #define QUERY_ITEMS 2
  35. #define QUERY_FOREIGN 3
  36. #define QUERY_COSTLY 4
  37. //
  38. // The definition of the only routine of perfutil.c, It builds part of a
  39. // performance data instance (PERF_INSTANCE_DEFINITION) as described in
  40. // winperf.h
  41. //
  42. BOOL MonBuildInstanceDefinition (PERF_INSTANCE_DEFINITION *,
  43. PVOID *,
  44. DWORD,
  45. DWORD,
  46. DWORD,
  47. PUNICODE_STRING);
  48. HANDLE MonOpenEventLog ();
  49. VOID MonCloseEventLog ();
  50. DWORD GetQueryType (IN LPWSTR);
  51. BOOL IsNumberInUnicodeList (DWORD, LPWSTR);
  52. //
  53. // Memory Probe macro (not implemented)
  54. //
  55. #define HEAP_PROBE() ;
  56. #endif //_PERFUTIL_H_