Log involuntary context switches correctly.
This commit is contained in:
parent
fb2ef015b9
commit
f79f1784c9
@ -243,7 +243,7 @@ ast(struct trapframe *framep)
|
|||||||
if (flags & TDF_NEEDRESCHED) {
|
if (flags & TDF_NEEDRESCHED) {
|
||||||
#ifdef KTRACE
|
#ifdef KTRACE
|
||||||
if (KTRPOINT(td, KTR_CSW))
|
if (KTRPOINT(td, KTR_CSW))
|
||||||
ktrcsw(1, 0);
|
ktrcsw(1, 1);
|
||||||
#endif
|
#endif
|
||||||
mtx_lock_spin(&sched_lock);
|
mtx_lock_spin(&sched_lock);
|
||||||
sched_prio(td, kg->kg_user_pri);
|
sched_prio(td, kg->kg_user_pri);
|
||||||
@ -252,7 +252,7 @@ ast(struct trapframe *framep)
|
|||||||
mtx_unlock_spin(&sched_lock);
|
mtx_unlock_spin(&sched_lock);
|
||||||
#ifdef KTRACE
|
#ifdef KTRACE
|
||||||
if (KTRPOINT(td, KTR_CSW))
|
if (KTRPOINT(td, KTR_CSW))
|
||||||
ktrcsw(0, 0);
|
ktrcsw(0, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (flags & TDF_NEEDSIGCHK) {
|
if (flags & TDF_NEEDSIGCHK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user