Rebase against 5b4f8a385b46a8a8a8b09b8ca6578aa7b7995a1e.

This commit is contained in:
Sebastian Lackner
2017-04-02 05:09:40 +02:00
parent 4232441093
commit 55ab42ece0
12 changed files with 194 additions and 270 deletions

View File

@@ -1,22 +1,22 @@
From 16d6f502dc86d2356b476ef0449b38353e3abc73 Mon Sep 17 00:00:00 2001
From 92de09926e79c3d91819e946519c19c2138eeeb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Mar 2017 22:56:45 +0100
Subject: ntdll: Fill process virtual memory counters in
NtQuerySystemInformation.
FIXME: fill_VM_COUNTERS now uses a different method ... which one is better?
---
dlls/ntdll/nt.c | 3 +++
dlls/ntdll/ntdll_misc.h | 1 +
dlls/ntdll/process.c | 2 +-
dlls/ntdll/tests/info.c | 5 +----
dlls/ntdll/thread.c | 36 ++++++++++++++++++++++++++++++++++++
5 files changed, 42 insertions(+), 5 deletions(-)
4 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 1dd890c4bd..a793b57221 100644
index 8b84cd865b..86d13b88f1 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2077,8 +2077,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -1981,8 +1981,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
if (reply->unix_pid != -1)
@@ -29,20 +29,20 @@ index 1dd890c4bd..a793b57221 100644
}
len += procstructlen;
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 0ecc099133..d556a21ee6 100644
index 443c86000d..6549a71fc0 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -289,4 +289,5 @@ extern void CDECL NTDLL_wine_get_host_version( const char **sysname, const char
@@ -269,4 +269,5 @@ NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
/* process / thread time */
extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN;
+extern BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) DECLSPEC_HIDDEN;
#endif
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 39cd8be601..993d90290d 100644
index 952225688c..691848fcd9 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -135,7 +135,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
@@ -163,7 +163,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
{
@@ -51,24 +51,8 @@ index 39cd8be601..993d90290d 100644
}
#endif
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index c65a74bf5e..b9c44267a9 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1134,10 +1134,7 @@ static void test_query_process_vm(void)
/* Check if we have some return values */
trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize);
- todo_wine
- {
- ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n");
- }
+ ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n");
}
static void test_query_process_io(void)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 28ce2a1362..ccbc41d6ac 100644
index 29b6513f38..6a56ebafd9 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -117,6 +117,42 @@ BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,