Per-thread diagnostics
include/thread/thread_diag.h View source View on GitHubStructs
Section titled “Structs”thread_wait_arm
Section titled “thread_wait_arm” struct thread_wait_arm (11 fields) source
§
const char *site which arming path
§
void *ra caller of arm
§
void *object first registered object (NULL for park)
§
uint64_t first_epoch wait epoch when this descriptor was installed
§
uint64_t last_epoch wait epoch of the most recent identical arm
§
uint64_t repeats consecutive arms carrying this descriptor
§
uint8_t state enum thread_state armed into
§
uint8_t wait_type enum thread_wait_type armed with
§
thread_act_reason_t reason block/sleep reason byte
§
uint16_t block_count thread_diag
Section titled “thread_diag” struct thread_diag (6 fields) source
§
struct thread_wait_arm wait_trace[THREAD_WAIT_TRACE_DEPTH] §
uint64_t wait_arm_count §
uint64_t wait_arm_total §
uint64_t apc_deliver_entries calls to deliver_apc_type()
§
uint64_t apc_deliver_max most APCs drained by a single call
§
void *apc_last_deliver_ra who called apc_check_and_deliver()
Functions
Section titled “Functions”thread_diag_attach
Section titled “thread_diag_attach”bool thread_diag_attach(struct thread *t, struct thread_diag *d) source thread_diag_detach
Section titled “thread_diag_detach”thread_diag
Section titled “thread_diag”struct thread_diag * thread_diag(struct thread *t) source thread_diag_record_arm
Section titled “thread_diag_record_arm”void thread_diag_record_arm(
struct thread *t,
const char *site,
void *ra,
void *object,
enum thread_state state,
enum thread_wait_type type,
uint8_t reason
) source thread_diag_apc_deliver_enter
Section titled “thread_diag_apc_deliver_enter”thread_diag_apc_deliver_batch
Section titled “thread_diag_apc_deliver_batch”thread_dump_wait_trace
Section titled “thread_dump_wait_trace”Macros
Section titled “Macros”THREAD_WAIT_TRACE_DEPTH
Section titled “THREAD_WAIT_TRACE_DEPTH”#define THREAD_WAIT_TRACE_DEPTH UINT64_C(16) source