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.

127 lines
4.1 KiB

  1. //
  2. // Systrack - System resource tracking
  3. // Copyright (c) Microsoft Corporation, 1997
  4. //
  5. //
  6. // header: memory.hxx
  7. // author: silviuc
  8. // created: Fri Nov 20 19:54:31 1998
  9. //
  10. #ifndef _MEMORY_HXX_INCLUDED_
  11. #define _MEMORY_HXX_INCLUDED_
  12. #define TRACK_AVAILABLE_PAGES 1
  13. #define TRACK_COMMITTED_PAGES 2
  14. #define TRACK_COMMIT_LIMIT 3
  15. #define TRACK_PAGE_FAULT_COUNT 4
  16. #define TRACK_SYSTEM_CALLS 5
  17. #define TRACK_TOTAL_SYSTEM_DRIVER_PAGES 6
  18. #define TRACK_TOTAL_SYSTEM_CODE_PAGES 7
  19. //
  20. // Note. How to add tracking for a new performance counter?
  21. //
  22. // (1) Let's say we want to do this for SystemCalls counter.
  23. // (2) define TRACK_SYSTEM_CALLS with unique value in memory.hxx
  24. // (3) add code in the switck from TrackPerformanceCounter()
  25. // (memory.cxx) for it.
  26. // (4) add code in main() (systrack.cxx) for command line parsing.
  27. // (5) modify the help string from Help() (systrack.cxx) to display
  28. // information for the new tracking feature.
  29. // (6) add code in DetailedHelp() (systrack.cxx) for the counter.
  30. // This should give specific details about what does the counter
  31. // represent.
  32. //
  33. #if 0
  34. _dump_ (Info, IoReadOperationCount);
  35. _dump_ (Info, IoWriteOperationCount);
  36. _dump_ (Info, IoOtherOperationCount);
  37. _dump_ (Info, AvailablePages);
  38. _dump_ (Info, CommittedPages);
  39. _dump_ (Info, CommitLimit);
  40. _dump_ (Info, PeakCommitment);
  41. _dump_ (Info, PageFaultCount);
  42. _dump_ (Info, CopyOnWriteCount);
  43. _dump_ (Info, TransitionCount);
  44. _dump_ (Info, CacheTransitionCount);
  45. _dump_ (Info, DemandZeroCount);
  46. _dump_ (Info, PageReadCount);
  47. _dump_ (Info, PageReadIoCount);
  48. _dump_ (Info, CacheReadCount);
  49. _dump_ (Info, CacheIoCount);
  50. _dump_ (Info, DirtyPagesWriteCount);
  51. _dump_ (Info, DirtyWriteIoCount);
  52. _dump_ (Info, MappedPagesWriteCount);
  53. _dump_ (Info, MappedWriteIoCount);
  54. _dump_ (Info, PagedPoolPages);
  55. _dump_ (Info, NonPagedPoolPages);
  56. _dump_ (Info, PagedPoolAllocs);
  57. _dump_ (Info, PagedPoolFrees);
  58. _dump_ (Info, NonPagedPoolAllocs);
  59. _dump_ (Info, NonPagedPoolFrees);
  60. _dump_ (Info, FreeSystemPtes);
  61. _dump_ (Info, ResidentSystemCodePage);
  62. _dump_ (Info, TotalSystemDriverPages);
  63. _dump_ (Info, TotalSystemCodePages);
  64. _dump_ (Info, NonPagedPoolLookasideHits);
  65. _dump_ (Info, PagedPoolLookasideHits);
  66. #if 0
  67. _dump_ (Info, Spare3Count);
  68. #endif
  69. _dump_ (Info, ResidentSystemCachePage);
  70. _dump_ (Info, ResidentPagedPoolPage);
  71. _dump_ (Info, ResidentSystemDriverPage);
  72. _dump_ (Info, CcFastReadNoWait);
  73. _dump_ (Info, CcFastReadWait);
  74. _dump_ (Info, CcFastReadResourceMiss);
  75. _dump_ (Info, CcFastReadNotPossible);
  76. _dump_ (Info, CcFastMdlReadNoWait);
  77. _dump_ (Info, CcFastMdlReadWait);
  78. _dump_ (Info, CcFastMdlReadResourceMiss);
  79. _dump_ (Info, CcFastMdlReadNotPossible);
  80. _dump_ (Info, CcMapDataNoWait);
  81. _dump_ (Info, CcMapDataWait);
  82. _dump_ (Info, CcMapDataNoWaitMiss);
  83. _dump_ (Info, CcMapDataWaitMiss);
  84. _dump_ (Info, CcPinMappedDataCount);
  85. _dump_ (Info, CcPinReadNoWait);
  86. _dump_ (Info, CcPinReadWait);
  87. _dump_ (Info, CcPinReadNoWaitMiss);
  88. _dump_ (Info, CcPinReadWaitMiss);
  89. _dump_ (Info, CcCopyReadNoWait);
  90. _dump_ (Info, CcCopyReadWait);
  91. _dump_ (Info, CcCopyReadNoWaitMiss);
  92. _dump_ (Info, CcCopyReadWaitMiss);
  93. _dump_ (Info, CcMdlReadNoWait);
  94. _dump_ (Info, CcMdlReadWait);
  95. _dump_ (Info, CcMdlReadNoWaitMiss);
  96. _dump_ (Info, CcMdlReadWaitMiss);
  97. _dump_ (Info, CcReadAheadIos);
  98. _dump_ (Info, CcLazyWriteIos);
  99. _dump_ (Info, CcLazyWritePages);
  100. _dump_ (Info, CcDataFlushes);
  101. _dump_ (Info, CcDataPages);
  102. _dump_ (Info, ContextSwitches);
  103. _dump_ (Info, FirstLevelTbFills);
  104. _dump_ (Info, SecondLevelTbFills);
  105. _dump_ (Info, SystemCalls);
  106. #endif
  107. void TrackPerformanceCounter (
  108. char * Name,
  109. ULONG Id,
  110. ULONG Period,
  111. LONG Delta);
  112. // ...
  113. #endif // #ifndef _MEMORY_HXX_INCLUDED_
  114. //
  115. // end of header: memory.hxx
  116. //