Move file handling logic in prof_data to prof_sys
This commit is contained in:
@@ -12,8 +12,8 @@ bool prof_bt_keycomp(const void *k1, const void *k2);
|
||||
bool prof_data_init(tsd_t *tsd);
|
||||
char *prof_thread_name_alloc(tsd_t *tsd, const char *thread_name);
|
||||
int prof_thread_name_set_impl(tsd_t *tsd, const char *thread_name);
|
||||
bool prof_dump(tsd_t *tsd, bool propagate_err, const char *filename,
|
||||
bool leakcheck);
|
||||
void prof_dump_impl(tsd_t *tsd, prof_tdata_t *tdata,
|
||||
void (*write_cb)(const char *), bool leakcheck);
|
||||
prof_tdata_t * prof_tdata_init_impl(tsd_t *tsd, uint64_t thr_uid,
|
||||
uint64_t thr_discrim, char *thread_name, bool active);
|
||||
void prof_tdata_detach(tsd_t *tsd, prof_tdata_t *tdata);
|
||||
|
@@ -87,14 +87,6 @@ uint64_t prof_sample_new_event_wait(tsd_t *tsd);
|
||||
uint64_t prof_sample_postponed_event_wait(tsd_t *tsd);
|
||||
void prof_sample_event_handler(tsd_t *tsd, uint64_t elapsed);
|
||||
|
||||
/* Used by unit tests. */
|
||||
typedef int (prof_dump_open_file_t)(const char *, int);
|
||||
extern prof_dump_open_file_t *JET_MUTABLE prof_dump_open_file;
|
||||
typedef ssize_t (prof_dump_write_file_t)(int, const void *, size_t);
|
||||
extern prof_dump_write_file_t *JET_MUTABLE prof_dump_write_file;
|
||||
typedef int (prof_dump_open_maps_t)();
|
||||
extern prof_dump_open_maps_t *JET_MUTABLE prof_dump_open_maps;
|
||||
|
||||
bool prof_log_start(tsdn_t *tsdn, const char *filename);
|
||||
bool prof_log_stop(tsdn_t *tsdn);
|
||||
|
||||
|
@@ -5,11 +5,6 @@ extern malloc_mutex_t prof_dump_filename_mtx;
|
||||
extern base_t *prof_base;
|
||||
|
||||
void prof_sys_thread_name_fetch(tsd_t *tsd);
|
||||
|
||||
/* Used in unit tests. */
|
||||
typedef int (prof_sys_thread_name_read_t)(char *buf, size_t limit);
|
||||
extern prof_sys_thread_name_read_t *JET_MUTABLE prof_sys_thread_name_read;
|
||||
|
||||
void prof_get_default_filename(tsdn_t *tsdn, char *filename, uint64_t ind);
|
||||
bool prof_dump_prefix_set(tsdn_t *tsdn, const char *prefix);
|
||||
void prof_fdump_impl(tsd_t *tsd);
|
||||
@@ -17,4 +12,14 @@ void prof_idump_impl(tsd_t *tsd);
|
||||
bool prof_mdump_impl(tsd_t *tsd, const char *filename);
|
||||
void prof_gdump_impl(tsd_t *tsd);
|
||||
|
||||
/* Used in unit tests. */
|
||||
typedef int (prof_sys_thread_name_read_t)(char *buf, size_t limit);
|
||||
extern prof_sys_thread_name_read_t *JET_MUTABLE prof_sys_thread_name_read;
|
||||
typedef int (prof_dump_open_file_t)(const char *, int);
|
||||
extern prof_dump_open_file_t *JET_MUTABLE prof_dump_open_file;
|
||||
typedef ssize_t (prof_dump_write_file_t)(int, const void *, size_t);
|
||||
extern prof_dump_write_file_t *JET_MUTABLE prof_dump_write_file;
|
||||
typedef int (prof_dump_open_maps_t)();
|
||||
extern prof_dump_open_maps_t *JET_MUTABLE prof_dump_open_maps;
|
||||
|
||||
#endif /* JEMALLOC_INTERNAL_PROF_SYS_H */
|
||||
|
Reference in New Issue
Block a user