From 9ac52315d4cf5f561f36dabaf0720c00d3553162 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 15 Oct 2007 17:00:19 +0200 Subject: sched: guest CPU accounting: add guest-CPU /proc//stat fields like for cpustat, introduce the "gtime" (guest time of the task) and "cgtime" (guest time of the task children) fields for the tasks. Modify signal_struct and task_struct. Modify /proc//stat to display these new fields. Signed-off-by: Laurent Vivier Acked-by: Avi Kivity Signed-off-by: Ingo Molnar --- include/linux/sched.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/sched.h b/include/linux/sched.h index 3a6e05e7771..fefce22e4c1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -517,6 +517,8 @@ struct signal_struct { * in __exit_signal, except for the group leader. */ cputime_t utime, stime, cutime, cstime; + cputime_t gtime; + cputime_t cgtime; unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; unsigned long inblock, oublock, cinblock, coublock; @@ -1048,6 +1050,7 @@ struct task_struct { unsigned int rt_priority; cputime_t utime, stime; + cputime_t gtime; unsigned long nvcsw, nivcsw; /* context switch counts */ struct timespec start_time; /* monotonic time */ struct timespec real_start_time; /* boot based time */ -- cgit v1.2.3