diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 2 | ||||
-rw-r--r-- | kernel/sched.c | 33 |
2 files changed, 3 insertions, 32 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 29068ab2670a..2eaf68b634e3 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -115,7 +115,7 @@ static void __exit_signal(struct task_struct *tsk) | |||
115 | task_times(tsk, &utime, &stime); | 115 | task_times(tsk, &utime, &stime); |
116 | sig->utime = cputime_add(sig->utime, utime); | 116 | sig->utime = cputime_add(sig->utime, utime); |
117 | sig->stime = cputime_add(sig->stime, stime); | 117 | sig->stime = cputime_add(sig->stime, stime); |
118 | sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); | 118 | sig->gtime = cputime_add(sig->gtime, tsk->gtime); |
119 | sig->min_flt += tsk->min_flt; | 119 | sig->min_flt += tsk->min_flt; |
120 | sig->maj_flt += tsk->maj_flt; | 120 | sig->maj_flt += tsk->maj_flt; |
121 | sig->nvcsw += tsk->nvcsw; | 121 | sig->nvcsw += tsk->nvcsw; |
diff --git a/kernel/sched.c b/kernel/sched.c index 475a6f2b7158..82251c21f785 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5182,22 +5182,12 @@ void account_idle_ticks(unsigned long ticks) | |||
5182 | * Use precise platform statistics if available: | 5182 | * Use precise platform statistics if available: |
5183 | */ | 5183 | */ |
5184 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 5184 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
5185 | cputime_t task_utime(struct task_struct *p) | ||
5186 | { | ||
5187 | return p->utime; | ||
5188 | } | ||
5189 | |||
5190 | cputime_t task_stime(struct task_struct *p) | ||
5191 | { | ||
5192 | return p->stime; | ||
5193 | } | ||
5194 | |||
5195 | void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | 5185 | void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) |
5196 | { | 5186 | { |
5197 | if (ut) | 5187 | if (ut) |
5198 | *ut = task_utime(p); | 5188 | *ut = p->utime; |
5199 | if (st) | 5189 | if (st) |
5200 | *st = task_stime(p); | 5190 | *st = p->stime; |
5201 | } | 5191 | } |
5202 | #else | 5192 | #else |
5203 | 5193 | ||
@@ -5235,27 +5225,8 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) | |||
5235 | if (st) | 5225 | if (st) |
5236 | *st = p->prev_stime; | 5226 | *st = p->prev_stime; |
5237 | } | 5227 | } |
5238 | |||
5239 | cputime_t task_utime(struct task_struct *p) | ||
5240 | { | ||
5241 | cputime_t utime; | ||
5242 | task_times(p, &utime, NULL); | ||
5243 | return utime; | ||
5244 | } | ||
5245 | |||
5246 | cputime_t task_stime(struct task_struct *p) | ||
5247 | { | ||
5248 | cputime_t stime; | ||
5249 | task_times(p, NULL, &stime); | ||
5250 | return stime; | ||
5251 | } | ||
5252 | #endif | 5228 | #endif |
5253 | 5229 | ||
5254 | inline cputime_t task_gtime(struct task_struct *p) | ||
5255 | { | ||
5256 | return p->gtime; | ||
5257 | } | ||
5258 | |||
5259 | /* | 5230 | /* |
5260 | * This function gets called by the timer code, with HZ frequency. | 5231 | * This function gets called by the timer code, with HZ frequency. |
5261 | * We call it with interrupts disabled. | 5232 | * We call it with interrupts disabled. |