diff options
author | fabient <fabient@FreeBSD.org> | 2010-03-31 20:00:44 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-03-31 20:00:44 +0000 |
commit | 3726a5ad0e37d6cd0a98c9a9b1928e07a98ead7a (patch) | |
tree | 9a9cde933eba93a80585f7be2ea10f804550b77a /sys/dev/hwpmc | |
parent | 4aabc5b3a441338f6bc148ac42080730c67f0a3f (diff) | |
download | FreeBSD-src-3726a5ad0e37d6cd0a98c9a9b1928e07a98ead7a.zip FreeBSD-src-3726a5ad0e37d6cd0a98c9a9b1928e07a98ead7a.tar.gz |
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
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index d331a85..e33b431 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -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. |