diff options
author | attilio <attilio@FreeBSD.org> | 2014-01-07 14:03:42 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2014-01-07 14:03:42 +0000 |
commit | 23d2536d967b362900ad5c5d582ca7546a35e7a5 (patch) | |
tree | 84afa66954dd551716e945ac77025775dcb144ba /sys/sys/pmckern.h | |
parent | c74f1326f9aaab6545a03bc46ab450063168cf0d (diff) | |
download | FreeBSD-src-23d2536d967b362900ad5c5d582ca7546a35e7a5.zip FreeBSD-src-23d2536d967b362900ad5c5d582ca7546a35e7a5.tar.gz |
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>
Diffstat (limited to 'sys/sys/pmckern.h')
-rw-r--r-- | sys/sys/pmckern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/pmckern.h b/sys/sys/pmckern.h index 70b9b3f..21b7ee7 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(); \ |