Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/jemalloc/include/jemalloc/internal/prof_externs.h
#ifndef JEMALLOC_INTERNAL_PROF_EXTERNS_H | #ifndef JEMALLOC_INTERNAL_PROF_EXTERNS_H | ||||
#define JEMALLOC_INTERNAL_PROF_EXTERNS_H | #define JEMALLOC_INTERNAL_PROF_EXTERNS_H | ||||
#include "jemalloc/internal/mutex.h" | #include "jemalloc/internal/mutex.h" | ||||
extern malloc_mutex_t bt2gctx_mtx; | extern malloc_mutex_t bt2gctx_mtx; | ||||
extern bool opt_prof; | extern bool opt_prof; | ||||
extern bool opt_prof_active; | extern bool opt_prof_active; | ||||
extern bool opt_prof_thread_active_init; | extern bool opt_prof_thread_active_init; | ||||
extern size_t opt_lg_prof_sample; /* Mean bytes between samples. */ | extern size_t opt_lg_prof_sample; /* Mean bytes between samples. */ | ||||
extern ssize_t opt_lg_prof_interval; /* lg(prof_interval). */ | extern ssize_t opt_lg_prof_interval; /* lg(prof_interval). */ | ||||
extern bool opt_prof_gdump; /* High-water memory dumping. */ | extern bool opt_prof_gdump; /* High-water memory dumping. */ | ||||
extern bool opt_prof_final; /* Final profile dumping. */ | extern bool opt_prof_final; /* Final profile dumping. */ | ||||
extern bool opt_prof_leak; /* Dump leak summary at exit. */ | extern bool opt_prof_leak; /* Dump leak summary at exit. */ | ||||
extern bool opt_prof_accum; /* Report cumulative bytes. */ | extern bool opt_prof_accum; /* Report cumulative bytes. */ | ||||
extern bool opt_prof_log; /* Turn logging on at boot. */ | |||||
extern char opt_prof_prefix[ | extern char opt_prof_prefix[ | ||||
/* Minimize memory bloat for non-prof builds. */ | /* Minimize memory bloat for non-prof builds. */ | ||||
#ifdef JEMALLOC_PROF | #ifdef JEMALLOC_PROF | ||||
PATH_MAX + | PATH_MAX + | ||||
#endif | #endif | ||||
1]; | 1]; | ||||
/* Accessed via prof_active_[gs]et{_unlocked,}(). */ | /* Accessed via prof_active_[gs]et{_unlocked,}(). */ | ||||
Show All 15 Lines | |||||
* Initialized as opt_lg_prof_sample, and potentially modified during profiling | * Initialized as opt_lg_prof_sample, and potentially modified during profiling | ||||
* resets. | * resets. | ||||
*/ | */ | ||||
extern size_t lg_prof_sample; | extern size_t lg_prof_sample; | ||||
void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); | void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); | ||||
void prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize, | void prof_malloc_sample_object(tsdn_t *tsdn, const void *ptr, size_t usize, | ||||
prof_tctx_t *tctx); | prof_tctx_t *tctx); | ||||
void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); | void prof_free_sampled_object(tsd_t *tsd, const void *ptr, size_t usize, | ||||
prof_tctx_t *tctx); | |||||
void bt_init(prof_bt_t *bt, void **vec); | void bt_init(prof_bt_t *bt, void **vec); | ||||
void prof_backtrace(prof_bt_t *bt); | void prof_backtrace(prof_bt_t *bt); | ||||
prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); | prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); | ||||
#ifdef JEMALLOC_JET | #ifdef JEMALLOC_JET | ||||
size_t prof_tdata_count(void); | size_t prof_tdata_count(void); | ||||
size_t prof_bt_count(void); | size_t prof_bt_count(void); | ||||
#endif | #endif | ||||
typedef int (prof_dump_open_t)(bool, const char *); | typedef int (prof_dump_open_t)(bool, const char *); | ||||
Show All 26 Lines | |||||
void prof_boot0(void); | void prof_boot0(void); | ||||
void prof_boot1(void); | void prof_boot1(void); | ||||
bool prof_boot2(tsd_t *tsd); | bool prof_boot2(tsd_t *tsd); | ||||
void prof_prefork0(tsdn_t *tsdn); | void prof_prefork0(tsdn_t *tsdn); | ||||
void prof_prefork1(tsdn_t *tsdn); | void prof_prefork1(tsdn_t *tsdn); | ||||
void prof_postfork_parent(tsdn_t *tsdn); | void prof_postfork_parent(tsdn_t *tsdn); | ||||
void prof_postfork_child(tsdn_t *tsdn); | void prof_postfork_child(tsdn_t *tsdn); | ||||
void prof_sample_threshold_update(prof_tdata_t *tdata); | void prof_sample_threshold_update(prof_tdata_t *tdata); | ||||
bool prof_log_start(tsdn_t *tsdn, const char *filename); | |||||
bool prof_log_stop(tsdn_t *tsdn); | |||||
#ifdef JEMALLOC_JET | |||||
size_t prof_log_bt_count(void); | |||||
size_t prof_log_alloc_count(void); | |||||
size_t prof_log_thr_count(void); | |||||
bool prof_log_is_logging(void); | |||||
bool prof_log_rep_check(void); | |||||
void prof_log_dummy_set(bool new_value); | |||||
#endif | |||||
#endif /* JEMALLOC_INTERNAL_PROF_EXTERNS_H */ | #endif /* JEMALLOC_INTERNAL_PROF_EXTERNS_H */ |