mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-26 17:16:37 -04:00
add thread name to ucollection
Signed-off-by: negegne <zhengshunxin@huawei.com>
This commit is contained in:
@@ -96,6 +96,7 @@ static void get_thread_load(struct task_struct *task, int cur_count,
|
||||
do_div(utime, NS_TO_MS);
|
||||
do_div(stime, NS_TO_MS);
|
||||
thread_cpu_item.tid = task->pid;
|
||||
strcpy(thread_cpu_item.name, task->comm);
|
||||
thread_cpu_item.cpu_usage_utime = utime;
|
||||
thread_cpu_item.cpu_usage_stime = stime;
|
||||
thread_cpu_item.cpu_load_time = 0;
|
||||
|
||||
@@ -39,6 +39,7 @@ struct ucollection_process_thread_count {
|
||||
|
||||
struct ucollection_thread_cpu_item {
|
||||
int tid;
|
||||
char name[16]; // 16 : max length of thread name
|
||||
unsigned long long cpu_usage_utime;
|
||||
unsigned long long cpu_usage_stime;
|
||||
unsigned long long cpu_load_time;
|
||||
|
||||
Reference in New Issue
Block a user