https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13d9d3ebbf300003c3184…
commit 13d9d3ebbf300003c318429d6bcd23ebb027af4e
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Dec 9 19:30:07 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Dec 9 19:30:07 2018 +0100
[NTOSKRNL] Also account PRCBs for Io operations counters
---
ntoskrnl/ex/sysinfo.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index b43aa2c1f9..1d8e1c539f 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -695,6 +695,19 @@ QSI_DEF(SystemPerformanceInformation)
Spi->IoReadOperationCount = IoReadOperationCount;
Spi->IoWriteOperationCount = IoWriteOperationCount;
Spi->IoOtherOperationCount = IoOtherOperationCount;
+ for (i = 0; i < KeNumberProcessors; i ++)
+ {
+ Prcb = KiProcessorBlock[i];
+ if (Prcb)
+ {
+ Spi->IoReadTransferCount.QuadPart +=
Prcb->IoReadTransferCount.QuadPart;
+ Spi->IoWriteTransferCount.QuadPart +=
Prcb->IoWriteTransferCount.QuadPart;
+ Spi->IoOtherTransferCount.QuadPart +=
Prcb->IoOtherTransferCount.QuadPart;
+ Spi->IoReadOperationCount += Prcb->IoReadOperationCount;
+ Spi->IoWriteOperationCount += Prcb->IoWriteOperationCount;
+ Spi->IoOtherOperationCount += Prcb->IoOtherOperationCount;
+ }
+ }
Spi->AvailablePages = (ULONG)MmAvailablePages;
/*
@@ -805,7 +818,6 @@ QSI_DEF(SystemPerformanceInformation)
}
}
-
return STATUS_SUCCESS;
}