From owner-svn-src-all@freebsd.org Sat Nov 25 20:49:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94539DEFE56; Sat, 25 Nov 2017 20:49:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8066E0BD; Sat, 25 Nov 2017 20:49:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAPKnRTw026692; Sat, 25 Nov 2017 20:49:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAPKnRaA026691; Sat, 25 Nov 2017 20:49:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711252049.vAPKnRaA026691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 25 Nov 2017 20:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326200 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 326200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2017 20:49:28 -0000 Author: mjg Date: Sat Nov 25 20:49:27 2017 New Revision: 326200 URL: https://svnweb.freebsd.org/changeset/base/326200 Log: Add the missing lockstat check for thread lock. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sat Nov 25 20:37:13 2017 (r326199) +++ head/sys/kern/kern_mutex.c Sat Nov 25 20:49:27 2017 (r326200) @@ -834,6 +834,8 @@ _thread_lock(struct thread *td) tid = (uintptr_t)curthread; + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(spin__acquire))) + goto slowpath_noirq; spinlock_enter(); m = td->td_lock; thread_lock_validate(m, 0, file, line); @@ -855,7 +857,12 @@ _thread_lock(struct thread *td) _mtx_release_lock_quick(m); slowpath_unlocked: spinlock_exit(); +slowpath_noirq: +#if LOCK_DEBUG > 0 + thread_lock_flags_(td, opts, file, line); +#else thread_lock_flags_(td, 0, 0, 0); +#endif } #endif