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
This commit is contained in:
Fabien Thomas 2010-03-31 20:00:44 +00:00
parent 64c12e81e2
commit 0e03140400

View File

@ -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.