Alex Henrie : ntdll/tests: Dump entire VM_COUNTERS structure.

Alexandre Julliard julliard at winehq.org
Wed May 17 15:58:30 CDT 2017


Module: wine
Branch: master
Commit: d6dfe19794cc521a8c009c258d3e9591e2fc06e8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d6dfe19794cc521a8c009c258d3e9591e2fc06e8

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Tue May 16 20:32:43 2017 -0600

ntdll/tests: Dump entire VM_COUNTERS structure.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/info.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index f8759fe..9fda2d5 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1046,6 +1046,22 @@ static void test_query_process_basic(void)
     ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n");
 }
 
+static void dump_vm_counters(const char *header, const VM_COUNTERS *pvi)
+{
+    trace("%s:\n", header);
+    trace("PeakVirtualSize           : %lu\n", pvi->PeakVirtualSize);
+    trace("VirtualSize               : %lu\n", pvi->VirtualSize);
+    trace("PageFaultCount            : %u\n",  pvi->PageFaultCount);
+    trace("PeakWorkingSetSize        : %lu\n", pvi->PeakWorkingSetSize);
+    trace("WorkingSetSize            : %lu\n", pvi->WorkingSetSize);
+    trace("QuotaPeakPagedPoolUsage   : %lu\n", pvi->QuotaPeakPagedPoolUsage);
+    trace("QuotaPagedPoolUsage       : %lu\n", pvi->QuotaPagedPoolUsage);
+    trace("QuotaPeakNonPagePoolUsage : %lu\n", pvi->QuotaPeakNonPagedPoolUsage);
+    trace("QuotaNonPagePoolUsage     : %lu\n", pvi->QuotaNonPagedPoolUsage);
+    trace("PagefileUsage             : %lu\n", pvi->PagefileUsage);
+    trace("PeakPagefileUsage         : %lu\n", pvi->PeakPagefileUsage);
+}
+
 static void test_query_process_vm(void)
 {
     NTSTATUS status;
@@ -1078,7 +1094,7 @@ static void test_query_process_vm(void)
     ok( ReturnLength == old_size || ReturnLength == sizeof(pvi), "Inconsistent length %d\n", ReturnLength);
 
     /* Check if we have some return values */
-    trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize);
+    dump_vm_counters("VM counters for GetCurrentProcess", &pvi);
     ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n");
 
     process = OpenProcess(PROCESS_VM_READ, FALSE, GetCurrentProcessId());
@@ -1097,7 +1113,7 @@ static void test_query_process_vm(void)
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
 
     /* Check if we have some return values */
-    trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize);
+    dump_vm_counters("VM counters for GetCurrentProcessId", &pvi);
     ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n");
 
     CloseHandle(process);




More information about the wine-cvs mailing list