Date: Tue, 7 Jan 2014 14:03:42 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260393 - head/sys/sys Message-ID: <201401071403.s07E3gAe033463@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Jan 7 14:03:42 2014 New Revision: 260393 URL: http://svnweb.freebsd.org/changeset/base/260393 Log: Use __predict_false() on sensitive lock paths as most of the times, when PMC-soft feature is not used the check will be false. Sponsored by: EMC / Isilon storage division Submitted by: Anton Rang <anton.rang@isilon.com> Modified: head/sys/sys/pmckern.h Modified: head/sys/sys/pmckern.h ============================================================================== --- head/sys/sys/pmckern.h Tue Jan 7 13:09:35 2014 (r260392) +++ head/sys/sys/pmckern.h Tue Jan 7 14:03:42 2014 (r260393) @@ -110,7 +110,7 @@ struct pmckern_soft { #ifdef PMC_FAKE_TRAPFRAME #define PMC_SOFT_CALL(pr, mo, fu, na) \ do { \ - if (pmc_##pr##_##mo##_##fu##_##na.ps_running) { \ + if (__predict_false(pmc_##pr##_##mo##_##fu##_##na.ps_running)) { \ struct pmckern_soft ks; \ register_t intr; \ intr = intr_disable(); \ @@ -135,7 +135,7 @@ do { \ */ #define PMC_SOFT_CALL_TF(pr, mo, fu, na, tf) \ do { \ - if (pmc_##pr##_##mo##_##fu##_##na.ps_running) { \ + if (__predict_false(pmc_##pr##_##mo##_##fu##_##na.ps_running)) { \ struct pmckern_soft ks; \ register_t intr; \ intr = intr_disable(); \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401071403.s07E3gAe033463>