svn commit: r205998 - head/sys/dev/hwpmc

[ Available lists | Index of svn-src-all | Month of Mar 2010 | Week of 31 Mar 2010 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Fabien Thomas <fabient@FreeBSD.org>
Date
31 Mar 2010 20:00:45
Subject
svn commit: r205998 - head/sys/dev/hwpmc
Message-ID
201003312000.o2VK0jGl007435@svn.freebsd.org


[ Hide this part ]
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.

Elapsed time: 0.115 seconds