2017-04-21 04:38:12 +08:00
|
|
|
#ifndef JEMALLOC_INTERNAL_STATS_H
|
|
|
|
#define JEMALLOC_INTERNAL_STATS_H
|
2010-01-17 01:53:50 +08:00
|
|
|
|
2017-05-28 06:35:36 +08:00
|
|
|
/* OPTION(opt, var_name, default, set_value_to) */
|
|
|
|
#define STATS_PRINT_OPTIONS \
|
|
|
|
OPTION('J', json, false, true) \
|
|
|
|
OPTION('g', general, true, false) \
|
|
|
|
OPTION('m', merged, config_stats, false) \
|
|
|
|
OPTION('d', destroyed, config_stats, false) \
|
|
|
|
OPTION('a', unmerged, config_stats, false) \
|
|
|
|
OPTION('b', bins, true, false) \
|
|
|
|
OPTION('l', large, true, false) \
|
2018-08-01 00:49:49 +08:00
|
|
|
OPTION('x', mutex, true, false) \
|
|
|
|
OPTION('e', extents, true, false)
|
2017-05-28 06:35:36 +08:00
|
|
|
|
|
|
|
enum {
|
|
|
|
#define OPTION(o, v, d, s) stats_print_option_num_##v,
|
|
|
|
STATS_PRINT_OPTIONS
|
|
|
|
#undef OPTION
|
|
|
|
stats_print_tot_num_options
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Options for stats_print. */
|
2017-04-21 04:38:12 +08:00
|
|
|
extern bool opt_stats_print;
|
2017-05-28 06:35:36 +08:00
|
|
|
extern char opt_stats_print_opts[stats_print_tot_num_options+1];
|
2017-04-21 04:38:12 +08:00
|
|
|
|
|
|
|
/* Implements je_malloc_stats_print. */
|
|
|
|
void stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
|
|
|
|
const char *opts);
|
|
|
|
|
|
|
|
#endif /* JEMALLOC_INTERNAL_STATS_H */
|