From f9a76508ab2e0b54af753fb017838857a059b3c6 Mon Sep 17 00:00:00 2001 From: Flavio Cruz <flaviocruz@gmail.com> Date: Mon, 17 Apr 2023 00:46:36 -0400 Subject: Update task_basic_info and thread_basic_info to include time_value64_t data. RPCs remain compatible with existing clients but if they know about the new size then we will populate the new fields. Message-Id: <ZDzPLCJccKeRB5Pd@mars.tail36e24.ts.net> --- include/mach/task_info.h | 8 ++++++++ include/mach/thread_info.h | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/mach/task_info.h b/include/mach/task_info.h index f448ee04..2631b04e 100644 --- a/include/mach/task_info.h +++ b/include/mach/task_info.h @@ -56,11 +56,19 @@ struct task_basic_info { integer_t base_priority; /* base scheduling priority */ rpc_vm_size_t virtual_size; /* number of virtual pages */ rpc_vm_size_t resident_size; /* number of resident pages */ + /* Deprecated, please use user_time64 */ rpc_time_value_t user_time; /* total user run time for terminated threads */ + /* Deprecated, please use system_time64 */ rpc_time_value_t system_time; /* total system run time for terminated threads */ + /* Deprecated, please use creation_time64 */ rpc_time_value_t creation_time; /* creation time stamp */ + time_value64_t user_time64; /* total user run time for + terminated threads */ + time_value64_t system_time64; /* total system run time for + terminated threads */ + time_value64_t creation_time64; /* creation time stamp */ }; typedef struct task_basic_info task_basic_info_data_t; diff --git a/include/mach/thread_info.h b/include/mach/thread_info.h index 46c1ceca..4f322e0a 100644 --- a/include/mach/thread_info.h +++ b/include/mach/thread_info.h @@ -55,7 +55,9 @@ typedef integer_t thread_info_data_t[THREAD_INFO_MAX]; #define THREAD_BASIC_INFO 1 /* basic information */ struct thread_basic_info { + /* Deprecated, please use user_time64 */ rpc_time_value_t user_time; /* user run time */ + /* Deprecated, please use system_time64 */ rpc_time_value_t system_time; /* system run time */ integer_t cpu_usage; /* scaled cpu usage percentage */ integer_t base_priority; /* base scheduling priority */ @@ -65,7 +67,11 @@ struct thread_basic_info { integer_t suspend_count; /* suspend count for thread */ integer_t sleep_time; /* number of seconds that thread has been sleeping */ + /* Deprecated, please use creation_time64 */ rpc_time_value_t creation_time; /* time stamp of creation */ + time_value64_t user_time64; /* user run time */ + time_value64_t system_time64; /* system run time */ + time_value64_t creation_time64; /* time stamp of creation */ }; typedef struct thread_basic_info thread_basic_info_data_t; -- cgit v1.2.3