MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ktr_enqueuerequest

Function ktr_enqueuerequest

freebsd/kern/kern_ktrace.c:343–353  ·  view source on GitHub ↗

* Some trace generation environments don't permit direct access to VFS, * such as during a context switch where sleeping is not allowed. Under these * circumstances, queue a request to the thread to be written asynchronously * later. */

Source from the content-addressed store, hash-verified

341 * later.
342 */
343static void
344ktr_enqueuerequest(struct thread *td, struct ktr_request *req)
345{
346
347 mtx_lock(&ktrace_mtx);
348 STAILQ_INSERT_TAIL(&td->td_proc->p_ktr, req, ktr_list);
349 mtx_unlock(&ktrace_mtx);
350 thread_lock(td);
351 td->td_flags |= TDF_ASTPENDING;
352 thread_unlock(td);
353}
354
355/*
356 * Drain any pending ktrace records from the per-thread queue to disk. This

Callers 7

ktrprocexitFunction · 0.85
ktrprocctor_enteredFunction · 0.85
ktrpsigFunction · 0.85
ktrcswFunction · 0.85
ktrcapfailFunction · 0.85
ktrfaultFunction · 0.85
ktrfaultendFunction · 0.85

Calls 2

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected