mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
6fc6433ecd
commit
bd106be404
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue