Rebase against 829170f3d6b875f7a6f065072cc3334a20ff805e

This commit is contained in:
Alistair Leslie-Hughes
2019-03-27 11:07:38 +11:00
parent 0d4d90ee80
commit a02caca06d
17 changed files with 89 additions and 326 deletions

View File

@@ -1,16 +1,16 @@
From 41da6df255dd09494827ad780e5821e119b4507b Mon Sep 17 00:00:00 2001
From 91682accdd60ed9d3aac6492acbf6deff814e820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Mar 2017 16:27:23 +0100
Subject: [PATCH] ntdll: Fill process kernel and user time.
---
dlls/ntdll/nt.c | 6 +++-
dlls/ntdll/ntdll_misc.h | 3 ++
dlls/ntdll/thread.c | 84 ++++++++++++++++++++++++++++---------------------
3 files changed, 56 insertions(+), 37 deletions(-)
dlls/ntdll/nt.c | 6 ++-
dlls/ntdll/ntdll_misc.h | 5 +++
dlls/ntdll/thread.c | 84 +++++++++++++++++++++++------------------
3 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 0db0d16..c370550 100644
index d2a4b1d35af..258798fcdee 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2451,6 +2451,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -41,19 +41,24 @@ index 0db0d16..c370550 100644
len += procstructlen;
}
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index fdc54c6..69005d0 100644
index 4835885d6c5..40bf66f1d24 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -260,4 +260,7 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
@@ -260,7 +260,12 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
+/* 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;
+
/* string functions */
int __cdecl NTDLL_tolower( int c );
int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 );
+
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index e4336ab..4279ae7 100644
index e4336ab1237..4279ae77099 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -149,6 +149,53 @@ static ULONG_PTR get_image_addr(void)
@@ -155,5 +160,5 @@ index e4336ab..4279ae7 100644
/* get values for current process instead */
--
1.9.1
2.20.1

View File

@@ -1,4 +1,4 @@
From e72a63216155c21784be784940782e995022a319 Mon Sep 17 00:00:00 2001
From d2f9bcfc14a960a4b365406a8610f9ab96f78e9b 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: [PATCH] ntdll: Fill process virtual memory counters in
@@ -13,10 +13,10 @@ FIXME: fill_VM_COUNTERS now uses a different method ... which one is better?
4 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 86695f7d23e..7736adca5b1 100644
index 3c2838f365e..5092b97d252 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2511,8 +2511,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2510,8 +2510,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
if (reply->unix_pid != -1)
@@ -29,17 +29,19 @@ index 86695f7d23e..7736adca5b1 100644
}
len += procstructlen;
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 4a411292cdc..467d66373dd 100644
index 40bf66f1d24..5ec14a399cc 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -261,4 +261,5 @@ NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
@@ -263,6 +263,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
/* 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
/* string functions */
int __cdecl NTDLL_tolower( int c );
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index bb4a1719c3c..709daf19faf 100644
index 34051c2ef93..94e8df8d8d1 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -203,7 +203,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
@@ -52,10 +54,10 @@ index bb4a1719c3c..709daf19faf 100644
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index fea1244620c..e56c02faec6 100644
index 4279ae77099..0f90291e222 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -197,6 +197,42 @@ BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
@@ -195,6 +195,42 @@ BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
return FALSE;
}