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>
This commit is contained in:
Attilio Rao 2014-01-07 14:03:42 +00:00
parent c7b81b2fe5
commit fdac1e8bdc

View File

@ -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(); \