hwpmc: don't defer user callchain capture completion to ast

This commit is contained in:
Matt Macy 2018-06-04 21:17:30 +00:00
parent d0f86f663f
commit ac7012d284
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334637

View File

@ -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__));