Author: mmacy Date: Mon Jun 4 21:17:30 2018 New Revision: 334637 URL: https://svnweb.freebsd.org/changeset/base/334637
Log: hwpmc: don't defer user callchain capture completion to ast Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 4 21:05:56 2018 (r334636) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Jun 4 21:17:30 2018 (r334637) @@ -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(); } /* @@ -2253,8 +2251,6 @@ pmc_hook_handler(struct thread *td, int function, void 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, _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"