https://git.reactos.org/?p=reactos.git;a=commitdiff;h=227c4321c26f42068bf64…
commit 227c4321c26f42068bf64aefcc37cad16e08cd94
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Feb 24 13:28:45 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Feb 24 13:36:26 2018 +0100
[NTOSKRNL] Add the CcMapDataWait and CcMapDataNoWait counters
---
ntoskrnl/cc/pin.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c
index 7b8d878731..d0a0d7e930 100644
--- a/ntoskrnl/cc/pin.c
+++ b/ntoskrnl/cc/pin.c
@@ -18,6 +18,9 @@
extern NPAGED_LOOKASIDE_LIST iBcbLookasideList;
+ULONG CcMapDataWait = 0;
+ULONG CcMapDataNoWait = 0;
+
/* FUNCTIONS *****************************************************************/
/*
@@ -45,6 +48,15 @@ CcMapData (
" pBcb 0x%p, pBuffer 0x%p)\n", FileObject, FileOffset->QuadPart,
Length, Flags, pBcb, pBuffer);
+ if (Flags & MAP_WAIT)
+ {
+ ++CcMapDataWait;
+ }
+ else
+ {
+ ++CcMapDataNoWait;
+ }
+
ReadOffset = FileOffset->QuadPart;
ASSERT(FileObject);