Date: Fri, 14 Apr 2017 14:45:44 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316843 - stable/10/sys/kern Message-ID: <201704141445.v3EEjibq074907@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Apr 14 14:45:44 2017 New Revision: 316843 URL: https://svnweb.freebsd.org/changeset/base/316843 Log: MFC r315960: dtrace sched:::preempt should fire only when there is preemption Modified: stable/10/sys/kern/kern_synch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_synch.c ============================================================================== --- stable/10/sys/kern/kern_synch.c Fri Apr 14 14:45:39 2017 (r316842) +++ stable/10/sys/kern/kern_synch.c Fri Apr 14 14:45:44 2017 (r316843) @@ -462,7 +462,11 @@ mi_switch(int flags, struct thread *newt PCPU_SET(switchticks, ticks); CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)", td->td_tid, td->td_sched, 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 #ifdef XEN PT_UPDATES_FLUSH(); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704141445.v3EEjibq074907>