2020-04-01 00:42:11 +08:00
|
|
|
#ifndef JEMALLOC_INTERNAL_PROF_RECENT_H
|
|
|
|
#define JEMALLOC_INTERNAL_PROF_RECENT_H
|
2019-12-19 05:38:14 +08:00
|
|
|
|
2023-06-10 08:37:47 +08:00
|
|
|
#include "jemalloc/internal/jemalloc_preamble.h"
|
|
|
|
#include "jemalloc/internal/edata.h"
|
|
|
|
#include "jemalloc/internal/mutex.h"
|
|
|
|
|
2020-04-04 01:26:03 +08:00
|
|
|
extern malloc_mutex_t prof_recent_alloc_mtx;
|
2020-04-14 03:05:51 +08:00
|
|
|
extern malloc_mutex_t prof_recent_dump_mtx;
|
|
|
|
|
2019-12-19 05:38:14 +08:00
|
|
|
bool prof_recent_alloc_prepare(tsd_t *tsd, prof_tctx_t *tctx);
|
2020-08-12 06:35:41 +08:00
|
|
|
void prof_recent_alloc(tsd_t *tsd, edata_t *edata, size_t size, size_t usize);
|
2019-12-19 05:38:14 +08:00
|
|
|
void prof_recent_alloc_reset(tsd_t *tsd, edata_t *edata);
|
2023-07-06 04:33:34 +08:00
|
|
|
bool prof_recent_init(void);
|
2019-12-19 05:38:14 +08:00
|
|
|
void edata_prof_recent_alloc_init(edata_t *edata);
|
2020-06-18 00:57:54 +08:00
|
|
|
|
|
|
|
/* Used in unit tests. */
|
2020-04-03 04:40:22 +08:00
|
|
|
typedef ql_head(prof_recent_t) prof_recent_list_t;
|
|
|
|
extern prof_recent_list_t prof_recent_alloc_list;
|
2020-06-18 00:57:54 +08:00
|
|
|
edata_t *prof_recent_alloc_edata_get_no_lock_test(const prof_recent_t *node);
|
|
|
|
prof_recent_t *edata_prof_recent_alloc_get_no_lock_test(const edata_t *edata);
|
2019-12-19 05:38:14 +08:00
|
|
|
|
2023-07-06 04:33:34 +08:00
|
|
|
ssize_t prof_recent_alloc_max_ctl_read(void);
|
2020-04-04 01:26:03 +08:00
|
|
|
ssize_t prof_recent_alloc_max_ctl_write(tsd_t *tsd, ssize_t max);
|
|
|
|
void prof_recent_alloc_dump(tsd_t *tsd, write_cb_t *write_cb, void *cbopaque);
|
|
|
|
|
2020-04-01 00:42:11 +08:00
|
|
|
#endif /* JEMALLOC_INTERNAL_PROF_RECENT_H */
|