From owner-svn-src-all@freebsd.org Fri Feb 24 01:39:10 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 014EACE8EF4; Fri, 24 Feb 2017 01:39:09 +0000 (UTC) (envelope-from imp@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 B0F8E1966; Fri, 24 Feb 2017 01:39:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1O1d8oC075688; Fri, 24 Feb 2017 01:39:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1O1d86T075687; Fri, 24 Feb 2017 01:39:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702240139.v1O1d86T075687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 Feb 2017 01:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314187 - head/sys/kern X-SVN-Group: head 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.23 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: Fri, 24 Feb 2017 01:39:10 -0000 Author: imp Date: Fri Feb 24 01:39:08 2017 New Revision: 314187 URL: https://svnweb.freebsd.org/changeset/base/314187 Log: KDTRACE_HOOKS isn't guaranteed to be defined. Change to check to see if it is defined or not rather than if it is non-zero. Sponsored by: Netflix, Inc Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Thu Feb 23 23:48:44 2017 (r314186) +++ head/sys/kern/kern_mutex.c Fri Feb 24 01:39:08 2017 (r314187) @@ -514,7 +514,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, m->lock_object.lo_name, (void *)m->mtx_lock, file, line); #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) all_time -= lockstat_nsecs(&m->lock_object); @@ -720,7 +720,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&m->lock_object); @@ -804,7 +804,7 @@ thread_lock_flags_(struct thread *td, in #ifdef LOCK_PROFILING doing_lockprof = 1; -#elif KDTRACE_HOOKS +#elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&td->td_lock->lock_object);