diff options
| author | Matt Macy <mmacy@FreeBSD.org> | 2018-06-04 21:17:30 +0000 |
|---|---|---|
| committer | Matt Macy <mmacy@FreeBSD.org> | 2018-06-04 21:17:30 +0000 |
| commit | ac7012d2846cf4c7d5751a411dd3eb479d7501d4 (patch) | |
| tree | 0ee53a2583694c63197bc16f8c4dea7c8a888c5c /sys/dev/hwpmc | |
| parent | d0f86f663f1d00ddfffe13af5f1c10c27755e71a (diff) | |
Notes
Diffstat (limited to 'sys/dev/hwpmc')
| -rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 4c452598ad0f7..e9c47881894ef 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -1715,11 +1715,9 @@ pmc_process_thread_delete(struct thread *td) static void pmc_process_thread_userret(struct thread *td) { - - thread_lock(td); - curthread->td_flags |= TDF_ASTPENDING; - thread_unlock(td); - pmc_post_callchain_callback(); + sched_pin(); + pmc_capture_user_callchain(curcpu, PMC_UR, td->td_frame); + sched_unpin(); } /* @@ -2254,8 +2252,6 @@ pmc_hook_handler(struct thread *td, int function, void *arg) cpu = PCPU_GET(cpuid); pmc_capture_user_callchain(cpu, PMC_SR, (struct trapframe *) arg); - pmc_capture_user_callchain(cpu, PMC_UR, - (struct trapframe *) arg); KASSERT(td->td_pinned == 1, ("[pmc,%d] invalid td_pinned value", __LINE__)); |
