Stack Depot
include/stack_depot.h View source View on GitHubStructs
Section titled “Structs”stack_depot_record
Section titled “stack_depot_record”struct stack_depot_record {
struct list_head hash_list;
refcount_t refcount;
size_t num_entries;
uint32_t hash;
uintptr_t entries[STACK_TRACE_MAX_DEPTH];
}; stack_depot_record_chain
Section titled “stack_depot_record_chain”struct stack_depot_record_chain {
struct list_head list;
struct spinlock lock;
}; stack_depot_globals
Section titled “stack_depot_globals”struct stack_depot_globals {
uint32_t starting_seed;
struct stack_depot_record_chain chains[STACK_DEPOT_HASH_SIZE];
_Atomic size_t num_records;
}; Functions
Section titled “Functions”stack_depot_hash
Section titled “stack_depot_hash”uint32_t stack_depot_hash(uintptr_t *entries, size_t num_entries); stack_depot_init
Section titled “stack_depot_init”void stack_depot_init(); stack_depot_save
Section titled “stack_depot_save”stack_handle_t stack_depot_save(uintptr_t *entries, size_t num_entries, enum alloc_flags flags); stack_depot_get_record
Section titled “stack_depot_get_record”struct stack_depot_record * stack_depot_get_record(stack_handle_t key); stack_depot_read
Section titled “stack_depot_read”size_t stack_depot_read(stack_handle_t key, uintptr_t *entries); stack_depot_print
Section titled “stack_depot_print”void stack_depot_print(stack_handle_t key); stack_depot_put
Section titled “stack_depot_put”void stack_depot_put(stack_handle_t key); stack_depot_save_current
Section titled “stack_depot_save_current”stack_handle_t stack_depot_save_current(); stack_depot_get_record_count
Section titled “stack_depot_get_record_count”size_t stack_depot_get_record_count(); Variables
Section titled “Variables”stack_depot_global
Section titled “stack_depot_global”extern struct stack_depot_globals stack_depot_global; Macros
Section titled “Macros”STACK_DEPOT_HASH_SIZE
Section titled “STACK_DEPOT_HASH_SIZE”#define STACK_DEPOT_HASH_SIZE 2048 STACK_DEPOT_ALLOW_ALLOC_FLAG
Section titled “STACK_DEPOT_ALLOW_ALLOC_FLAG”#define STACK_DEPOT_ALLOW_ALLOC_FLAG ALLOC_FLAG_AVAIL_BIT(0)