Use a local variable to store the number of ticks that elapsed in
kernel mode instead of (unintentionally) using the global `ticks'. This error completely broke profiling.
This commit is contained in:
parent
a428b35290
commit
e3277471d4
@ -76,6 +76,7 @@ userret(td, frame, oticks)
|
||||
#ifdef INVARIANTS
|
||||
struct kse *ke;
|
||||
#endif
|
||||
u_int64_t eticks;
|
||||
|
||||
CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid,
|
||||
p->p_comm);
|
||||
@ -109,8 +110,8 @@ userret(td, frame, oticks)
|
||||
*/
|
||||
|
||||
if (p->p_sflag & PS_PROFIL) {
|
||||
ticks = td->td_sticks - oticks;
|
||||
addupc_task(td, TRAPF_PC(frame), (u_int)ticks * psratio);
|
||||
eticks = td->td_sticks - oticks;
|
||||
addupc_task(td, TRAPF_PC(frame), (u_int)eticks * psratio);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user