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.

102 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datapage.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Page file performance data objects
  8. Created:
  9. Bob Watson 22-Oct-1996
  10. Revision History:
  11. None.
  12. --*/
  13. //
  14. // Include Files
  15. //
  16. #include <windows.h>
  17. #include <winperf.h>
  18. #include <ntprfctr.h>
  19. #include <perfutil.h>
  20. #include "datapage.h"
  21. // dummy variable for field sizing.
  22. static PAGEFILE_COUNTER_DATA pcd;
  23. //
  24. // Constant structure initializations
  25. // defined in datapage.h
  26. //
  27. PAGEFILE_DATA_DEFINITION PagefileDataDefinition = {
  28. { sizeof (PAGEFILE_DATA_DEFINITION) + sizeof(PAGEFILE_COUNTER_DATA),
  29. sizeof (PAGEFILE_DATA_DEFINITION),
  30. sizeof (PERF_OBJECT_TYPE),
  31. PAGEFILE_OBJECT_TITLE_INDEX,
  32. 0,
  33. 701,
  34. 0,
  35. PERF_DETAIL_ADVANCED,
  36. (sizeof(PAGEFILE_DATA_DEFINITION) - sizeof (PERF_OBJECT_TYPE))/
  37. sizeof(PERF_COUNTER_DEFINITION),
  38. 0,
  39. 0,
  40. UNICODE_CODE_PAGE,
  41. {0L,0L},
  42. {0L,0L}
  43. },
  44. { sizeof (PERF_COUNTER_DEFINITION),
  45. 702,
  46. 0,
  47. 703,
  48. 0,
  49. 0,
  50. PERF_DETAIL_ADVANCED,
  51. PERF_RAW_FRACTION,
  52. RTL_FIELD_SIZE (PAGEFILE_COUNTER_DATA, PercentInUse),
  53. (DWORD)(ULONG_PTR)&((PPAGEFILE_COUNTER_DATA)0)->PercentInUse
  54. },
  55. { sizeof (PERF_COUNTER_DEFINITION),
  56. 702,
  57. 0,
  58. 703,
  59. 0,
  60. 0,
  61. PERF_DETAIL_ADVANCED,
  62. PERF_RAW_BASE,
  63. RTL_FIELD_SIZE (PAGEFILE_COUNTER_DATA, PercentInUseBase),
  64. (DWORD)(ULONG_PTR)&((PPAGEFILE_COUNTER_DATA)0)->PercentInUseBase
  65. },
  66. { sizeof (PERF_COUNTER_DEFINITION),
  67. 704,
  68. 0,
  69. 705,
  70. 0,
  71. 0,
  72. PERF_DETAIL_ADVANCED,
  73. PERF_RAW_FRACTION,
  74. RTL_FIELD_SIZE (PAGEFILE_COUNTER_DATA, PeakUsage),
  75. (DWORD)(ULONG_PTR)&((PPAGEFILE_COUNTER_DATA)0)->PeakUsage
  76. },
  77. { sizeof (PERF_COUNTER_DEFINITION),
  78. 704,
  79. 0,
  80. 705,
  81. 0,
  82. 0,
  83. PERF_DETAIL_ADVANCED,
  84. PERF_RAW_BASE,
  85. RTL_FIELD_SIZE (PAGEFILE_COUNTER_DATA, PeakUsageBase),
  86. (DWORD)(ULONG_PTR)&((PPAGEFILE_COUNTER_DATA)0)->PeakUsageBase
  87. }
  88. };