dtrace sched:::preempt should fire only when there is preemption
The probe fire on any thread switch before. Reviewed by: markj MFC after: 1 week Sponsored by: Panzura
This commit is contained in:
parent
04ec8ce247
commit
9b9e5a69c6
@ -430,7 +430,11 @@ mi_switch(int flags, struct thread *newtd)
|
||||
PCPU_SET(switchticks, ticks);
|
||||
CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)",
|
||||
td->td_tid, td_get_sched(td), td->td_proc->p_pid, td->td_name);
|
||||
SDT_PROBE0(sched, , , preempt);
|
||||
#ifdef KDTRACE_HOOKS
|
||||
if ((flags & SW_PREEMPT) != 0 || ((flags & SW_INVOL) != 0 &&
|
||||
(flags & SW_TYPE_MASK) == SWT_NEEDRESCHED))
|
||||
SDT_PROBE0(sched, , , preempt);
|
||||
#endif
|
||||
sched_switch(td, newtd, flags);
|
||||
CTR4(KTR_PROC, "mi_switch: new thread %ld (td_sched %p, pid %ld, %s)",
|
||||
td->td_tid, td_get_sched(td), td->td_proc->p_pid, td->td_name);
|
||||
|
Loading…
Reference in New Issue
Block a user