Author: fabient
Date: Wed Mar 31 20:00:44 2010
New Revision: 205998
URL: http://svn.freebsd.org/changeset/base/205998

Log:
  If there is multiple PMCs for the same interrupt ignore new post.
  This will indirectly fix a bug where the thread will be pinned
  forever if the assert is not compiled.
  
  MFC after: 3days

Modified:
  head/sys/dev/hwpmc/hwpmc_mod.c

Modified: head/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_mod.c      Wed Mar 31 18:37:00 2010        
(r205997)
+++ head/sys/dev/hwpmc/hwpmc_mod.c      Wed Mar 31 20:00:44 2010        
(r205998)
@@ -3972,9 +3972,11 @@ pmc_post_callchain_callback(void)
 
        td = curthread;
 
-       KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0,
-           ("[pmc,%d] thread %p already marked for callchain capture",
-               __LINE__, (void *) td));
+       /*
+        * If there is multiple PMCs for the same interrupt ignore new post
+        */
+       if (td->td_pflags & TDP_CALLCHAIN)
+               return;
 
        /*
         * Mark this thread as needing callchain capture.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to