From 0992d9c79eb85668f76ad4f1c0b289a45cb89ec3 Mon Sep 17 00:00:00 2001 From: Fabien Thomas Date: Sat, 3 Apr 2010 07:19:31 +0000 Subject: MFC r205998: 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. --- sys/dev/hwpmc/hwpmc_mod.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 3a59f17714f3..3ae2caccbfc0 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -3976,9 +3976,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. -- cgit v1.3