Do not acquire the thread lock in hardclock_cnt() unless needed.
This function only sets thread flags if a SIGPROF or SIGVTALRM timer has fired, which is almost never the case. MFC after: 2 weeks
This commit is contained in:
parent
d82dbf711e
commit
e3564c4833
@ -570,9 +570,11 @@ hardclock_cnt(int cnt, int usermode)
|
|||||||
flags |= TDF_PROFPEND | TDF_ASTPENDING;
|
flags |= TDF_PROFPEND | TDF_ASTPENDING;
|
||||||
PROC_ITIMUNLOCK(p);
|
PROC_ITIMUNLOCK(p);
|
||||||
}
|
}
|
||||||
|
if (flags != 0) {
|
||||||
thread_lock(td);
|
thread_lock(td);
|
||||||
td->td_flags |= flags;
|
td->td_flags |= flags;
|
||||||
thread_unlock(td);
|
thread_unlock(td);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HWPMC_HOOKS
|
#ifdef HWPMC_HOOKS
|
||||||
if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid)))
|
if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user