2 #ifdef JEMALLOC_H_TYPES
4 typedef struct witness_s witness_t;
5 typedef unsigned witness_rank_t;
6 typedef ql_head(witness_t) witness_list_t;
7 typedef int witness_comp_t (
const witness_t *,
const witness_t *);
13 #define WITNESS_RANK_OMIT 0U
15 #define WITNESS_RANK_MIN 1U
17 #define WITNESS_RANK_INIT 1U
18 #define WITNESS_RANK_CTL 1U
19 #define WITNESS_RANK_TCACHES 2U
20 #define WITNESS_RANK_ARENAS 3U
22 #define WITNESS_RANK_PROF_DUMP 4U
23 #define WITNESS_RANK_PROF_BT2GCTX 5U
24 #define WITNESS_RANK_PROF_TDATAS 6U
25 #define WITNESS_RANK_PROF_TDATA 7U
26 #define WITNESS_RANK_PROF_GCTX 8U
34 #define WITNESS_RANK_CORE 9U
36 #define WITNESS_RANK_ARENA 9U
37 #define WITNESS_RANK_ARENA_CHUNKS 10U
38 #define WITNESS_RANK_ARENA_NODE_CACHE 11U
40 #define WITNESS_RANK_BASE 12U
42 #define WITNESS_RANK_LEAF 0xffffffffU
43 #define WITNESS_RANK_ARENA_BIN WITNESS_RANK_LEAF
44 #define WITNESS_RANK_ARENA_HUGE WITNESS_RANK_LEAF
45 #define WITNESS_RANK_DSS WITNESS_RANK_LEAF
46 #define WITNESS_RANK_PROF_ACTIVE WITNESS_RANK_LEAF
47 #define WITNESS_RANK_PROF_DUMP_SEQ WITNESS_RANK_LEAF
48 #define WITNESS_RANK_PROF_GDUMP WITNESS_RANK_LEAF
49 #define WITNESS_RANK_PROF_NEXT_THR_UID WITNESS_RANK_LEAF
50 #define WITNESS_RANK_PROF_THREAD_ACTIVE_INIT WITNESS_RANK_LEAF
52 #define WITNESS_INITIALIZER(rank) {"initializer", rank, NULL, {NULL, NULL}}
56 #ifdef JEMALLOC_H_STRUCTS
81 #ifdef JEMALLOC_H_EXTERNS
84 witness_comp_t *comp);
86 typedef void (witness_lock_error_t)(
const witness_list_t *,
const witness_t *);
90 const witness_t *witness);
93 typedef void (witness_owner_error_t)(
const witness_t *);
99 typedef void (witness_not_owner_error_t)(
const witness_t *);
105 typedef void (witness_depth_error_t)(
const witness_list_t *,
106 witness_rank_t rank_inclusive,
unsigned depth);
110 witness_rank_t rank_inclusive,
unsigned depth);
121 #ifdef JEMALLOC_H_INLINES
123 #ifndef JEMALLOC_ENABLE_INLINE
135 #if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_MUTEX_C_))
139 witness_list_t *witnesses;
164 if (witness->rank == WITNESS_RANK_OMIT)
176 witness_list_t *witnesses;
185 if (witness->rank == WITNESS_RANK_OMIT)
200 witness_list_t *witnesses;
215 if (
w->rank < rank_inclusive) {
239 witness_list_t *witnesses;
248 if (witness->rank == WITNESS_RANK_OMIT)
259 }
else if (
w->rank > witness->rank) {
262 }
else if (
w->rank == witness->rank && (
w->comp ==
NULL ||
w->comp !=
263 witness->comp ||
w->comp(
w, witness) > 0)) {
279 witness_list_t *witnesses;
287 if (witness->rank == WITNESS_RANK_OMIT)
static static fork const void static count static fd link
static const bool config_debug
#define witness_assert_not_owner
#define witness_assert_depth
#define witness_not_owner_error
#define witness_fork_cleanup
#define witness_assert_lockless
#define witness_assert_depth_to_rank
#define witness_postfork_parent
#define witness_owner_error
#define witness_lock_error
#define tsd_witnessesp_get
#define tsd_witness_fork_get
#define witness_assert_owner
#define witnesses_cleanup
#define witness_depth_error
#define witness_postfork_child
#define ql_remove(a_head, a_elm, a_field)
#define ql_reverse_foreach(a_var, a_head, a_field)
#define ql_elm_new(a_elm, a_field)
#define ql_tail_insert(a_head, a_elm, a_field)
#define ql_last(a_head, a_field)
#define ql_foreach(a_var, a_head, a_field)