Move KTRUSERRET() from userret() to ast(). It's a really long
detour - it writes ktrace entries to the filesystem - so the overhead of ast() won't make any difference. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26404
This commit is contained in:
parent
fedeb08b6a
commit
4658877815
@ -347,6 +347,9 @@ ktr_enqueuerequest(struct thread *td, struct ktr_request *req)
|
||||
mtx_lock(&ktrace_mtx);
|
||||
STAILQ_INSERT_TAIL(&td->td_proc->p_ktr, req, ktr_list);
|
||||
mtx_unlock(&ktrace_mtx);
|
||||
thread_lock(td);
|
||||
td->td_flags |= TDF_ASTPENDING;
|
||||
thread_unlock(td);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -130,9 +130,6 @@ userret(struct thread *td, struct trapframe *frame)
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
#endif
|
||||
#ifdef KTRACE
|
||||
KTRUSERRET(td);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Charge system time if profiling.
|
||||
@ -341,6 +338,10 @@ ast(struct trapframe *framep)
|
||||
if (td->td_pflags & TDP_SIGFASTPENDING)
|
||||
sigfastblock_setpend(td, false);
|
||||
|
||||
#ifdef KTRACE
|
||||
KTRUSERRET(td);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need to check to see if we have to exit or wait due to a
|
||||
* single threading requirement or some other STOP condition.
|
||||
|
Loading…
x
Reference in New Issue
Block a user