From fdac1e8bdc6e78698e1e22b975d338f2c6316547 Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Tue, 7 Jan 2014 14:03:42 +0000 Subject: [PATCH] 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 --- sys/sys/pmckern.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/pmckern.h b/sys/sys/pmckern.h index 70b9b3f9c3c9..21b7ee724fe1 100644 --- a/sys/sys/pmckern.h +++ b/sys/sys/pmckern.h @@ -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(); \