[NTOSKRNL] Add the CcPinMappedDataCount counter
authorPierre Schweitzer <pierre@reactos.org>
Sat, 13 Oct 2018 20:50:49 +0000 (22:50 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 13 Oct 2018 20:51:44 +0000 (22:51 +0200)
ntoskrnl/cc/pin.c
ntoskrnl/ex/sysinfo.c
ntoskrnl/include/internal/cc.h

index 37eca96..4f0e4f5 100644 (file)
@@ -23,11 +23,13 @@ extern NPAGED_LOOKASIDE_LIST iBcbLookasideList;
  * - Number of calls to CcMapData that couldn't wait
  * - Number of calls to CcPinRead that could wait
  * - Number of calls to CcPinRead that couldn't wait
+ * - Number of calls to CcPinMappedDataCount
  */
 ULONG CcMapDataWait = 0;
 ULONG CcMapDataNoWait = 0;
 ULONG CcPinReadWait = 0;
 ULONG CcPinReadNoWait = 0;
+ULONG CcPinMappedDataCount = 0;
 
 /* FUNCTIONS *****************************************************************/
 
@@ -429,6 +431,8 @@ CcPinMappedData (
 
     iBcb = *Bcb;
 
+    ++CcPinMappedDataCount;
+
     Result = CcpPinData(SharedCacheMap, FileOffset, Length, Flags, Bcb, &Buffer);
     if (Result)
     {
index ab8481b..09b9a63 100644 (file)
@@ -767,7 +767,7 @@ QSI_DEF(SystemPerformanceInformation)
     Spi->CcMapDataNoWaitMiss = 0; /* FIXME */
     Spi->CcMapDataWaitMiss = 0; /* FIXME */
 
-    Spi->CcPinMappedDataCount = 0; /* FIXME */
+    Spi->CcPinMappedDataCount = CcPinMappedDataCount;
     Spi->CcPinReadNoWait = CcPinReadNoWait;
     Spi->CcPinReadWait = CcPinReadWait;
     Spi->CcPinReadNoWaitMiss = 0; /* FIXME */
index 16dd1f6..8a5fb73 100644 (file)
@@ -62,6 +62,7 @@ extern ULONG CcMapDataWait;
 extern ULONG CcMapDataNoWait;
 extern ULONG CcPinReadWait;
 extern ULONG CcPinReadNoWait;
+extern ULONG CcPinMappedDataCount;
 extern ULONG CcDataPages;
 extern ULONG CcDataFlushes;