itimers: Merge ITIMER_VIRT and ITIMER_PROF
Both cpu itimers have same data flow in the few places, this patch make unification of code related with VIRT and PROF itimers. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> LKML-Reference: <1248862529-6063-2-git-send-email-sgruszka@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
ed680c4ad4
commit
42c4ab41a1
@@ -470,6 +470,11 @@ struct pacct_struct {
|
||||
unsigned long ac_minflt, ac_majflt;
|
||||
};
|
||||
|
||||
struct cpu_itimer {
|
||||
cputime_t expires;
|
||||
cputime_t incr;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct task_cputime - collected CPU time counts
|
||||
* @utime: time spent in user mode, in &cputime_t units
|
||||
@@ -564,9 +569,12 @@ struct signal_struct {
|
||||
struct pid *leader_pid;
|
||||
ktime_t it_real_incr;
|
||||
|
||||
/* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */
|
||||
cputime_t it_prof_expires, it_virt_expires;
|
||||
cputime_t it_prof_incr, it_virt_incr;
|
||||
/*
|
||||
* ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use
|
||||
* CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these
|
||||
* values are defined to 0 and 1 respectively
|
||||
*/
|
||||
struct cpu_itimer it[2];
|
||||
|
||||
/*
|
||||
* Thread group totals for process CPU timers.
|
||||
|
Reference in New Issue
Block a user