https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3d13a464f7b12534f3200…
commit 3d13a464f7b12534f32008f8c6eb3509cc1e456b
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Oct 13 22:50:49 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Oct 13 22:51:44 2018 +0200
[NTOSKRNL] Add the CcPinMappedDataCount counter
---
ntoskrnl/cc/pin.c | 4 ++++
ntoskrnl/ex/sysinfo.c | 2 +-
ntoskrnl/include/internal/cc.h | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c
index 37eca96de1..4f0e4f5a82 100644
--- a/ntoskrnl/cc/pin.c
+++ b/ntoskrnl/cc/pin.c
@@ -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)
{
diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index ab8481b328..09b9a6359c 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -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 */
diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h
index 16dd1f67f0..8a5fb73838 100644
--- a/ntoskrnl/include/internal/cc.h
+++ b/ntoskrnl/include/internal/cc.h
@@ -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;