diff options
author | jhb <jhb@FreeBSD.org> | 2006-02-21 21:48:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-02-21 21:48:42 +0000 |
commit | abc45ce01034a350e17a8e6e9be4260b6c2b2b67 (patch) | |
tree | 0816f08477f774543cbe58321e9f2374b3426b42 /sys/kern/kern_exit.c | |
parent | e9c312bcacf38cbd1d7827973ffb5a56d98f3e15 (diff) | |
download | FreeBSD-src-abc45ce01034a350e17a8e6e9be4260b6c2b2b67.zip FreeBSD-src-abc45ce01034a350e17a8e6e9be4260b6c2b2b67.tar.gz |
Move the ruadd() in kern_exit() to save our final stats in our child
stats even further down in exit1() so that it includes the runtime and
tick counts from the final time slice for the dying thread.
Reviewed by: phk
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index ec9a529..5785e0b 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -540,8 +540,6 @@ retry: p->p_state = PRS_ZOMBIE; PROC_UNLOCK(p->p_pptr); - ruadd(p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); - /* Do the same timestamp bookkeeping that mi_switch() would do. */ new_switchtime = cpu_ticks(); p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); @@ -552,6 +550,9 @@ retry: PCPU_SET(switchticks, ticks); cnt.v_swtch++; + /* Add our usage into the usage of all our children. */ + ruadd(p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); + sched_exit(p->p_pptr, td); /* |