Rebase against 123c0543e0bb4c99fbee0a568e786405ff886a93.

This commit is contained in:
Zebediah Figura
2020-03-27 16:55:10 -05:00
parent e5da84dc36
commit f9d1798edb
7 changed files with 72 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
From 06a283fc4f686ee3c3cf33fec4f7e7b2c3f64bc4 Mon Sep 17 00:00:00 2001
From 097c8310c57f8f5cbcd83da40436a35703f9c1cf 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.
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Fill process kernel and user time.
3 files changed, 57 insertions(+), 37 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 91d504f90aa..9c138726d68 100644
index 9ab9be4d0ce..81ed188c8bb 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2600,6 +2600,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2645,6 +2645,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
{
SYSTEM_PROCESS_INFORMATION* spi = SystemInformation;
SYSTEM_PROCESS_INFORMATION* last = NULL;
@@ -21,7 +21,7 @@ index 91d504f90aa..9c138726d68 100644
HANDLE hSnap = 0;
WCHAR procname[1024];
WCHAR* exename;
@@ -2637,7 +2638,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2682,7 +2683,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
if (Length >= len + procstructlen)
{
@@ -30,7 +30,7 @@ index 91d504f90aa..9c138726d68 100644
* vmCounters, ioCounters
*/
@@ -2655,6 +2656,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2700,6 +2701,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
@@ -41,7 +41,7 @@ index 91d504f90aa..9c138726d68 100644
len += procstructlen;
}
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 70707bec042..db7f00359cf 100644
index 20feabf56b8..9a487a0520d 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -270,6 +270,10 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
@@ -53,10 +53,10 @@ index 70707bec042..db7f00359cf 100644
+ LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN;
+
/* string functions */
int __cdecl NTDLL_tolower( int c );
int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 );
int __cdecl NTDLL_tolower( int c );
int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 );
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index c6b70c557b4..029d94d8a38 100644
index 73e530da4f5..711a8bb1898 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -153,6 +153,53 @@ static ULONG_PTR get_image_addr(void)
@@ -113,7 +113,7 @@ index c6b70c557b4..029d94d8a38 100644
/***********************************************************************
* set_process_name
*
@@ -975,42 +1022,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -963,42 +1010,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
#ifdef __linux__
/* only /proc provides exact values for a specific thread */
if (unix_pid != -1 && unix_tid != -1)
@@ -158,5 +158,5 @@ index c6b70c557b4..029d94d8a38 100644
/* get values for current process instead */
--
2.23.0
2.25.1

View File

@@ -1,4 +1,4 @@
From 9374f7ab587fe60c0e3436d15adf917a44e08711 Mon Sep 17 00:00:00 2001
From 1b90b687170f3a00093fcdf0914c9f89aea3a3bd 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 8382b61f2cb..c224fab14f9 100644
index c2466aa5bdf..6540a353fbe 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2659,8 +2659,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2704,8 +2704,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
if (reply->unix_pid != -1)
@@ -29,22 +29,22 @@ index 8382b61f2cb..c224fab14f9 100644
}
len += procstructlen;
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index f258bb601c2..7ceb3132a7c 100644
index 9a487a0520d..37b4f6fca14 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -272,6 +272,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
@@ -273,6 +273,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;
/* string functions */
int __cdecl NTDLL_tolower( int c );
int __cdecl NTDLL_tolower( int c );
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 9e5c0d39e78..9eecacb6728 100644
index 0f248378842..043aebe09bf 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -206,7 +206,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
@@ -192,7 +192,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
{
@@ -54,10 +54,10 @@ index 9e5c0d39e78..9eecacb6728 100644
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index bb18a22bad5..d010c018102 100644
index 711a8bb1898..843df8905f5 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -362,6 +362,42 @@ TEB *thread_init(void)
@@ -366,6 +366,42 @@ TEB *thread_init(void)
return teb;
}
@@ -101,5 +101,5 @@ index bb18a22bad5..d010c018102 100644
/***********************************************************************
* free_thread_data
--
2.17.1
2.25.1