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.r...@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();                                          
\
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to