1 1.1 christos #ifndef JEMALLOC_INTERNAL_STATS_H 2 1.1 christos #define JEMALLOC_INTERNAL_STATS_H 3 1.1 christos 4 1.1 christos /* OPTION(opt, var_name, default, set_value_to) */ 5 1.1 christos #define STATS_PRINT_OPTIONS \ 6 1.1 christos OPTION('J', json, false, true) \ 7 1.1 christos OPTION('g', general, true, false) \ 8 1.1 christos OPTION('m', merged, config_stats, false) \ 9 1.1 christos OPTION('d', destroyed, config_stats, false) \ 10 1.1 christos OPTION('a', unmerged, config_stats, false) \ 11 1.1 christos OPTION('b', bins, true, false) \ 12 1.1 christos OPTION('l', large, true, false) \ 13 1.1 christos OPTION('x', mutex, true, false) 14 1.1 christos 15 1.1 christos enum { 16 1.1 christos #define OPTION(o, v, d, s) stats_print_option_num_##v, 17 1.1 christos STATS_PRINT_OPTIONS 18 1.1 christos #undef OPTION 19 1.1 christos stats_print_tot_num_options 20 1.1 christos }; 21 1.1 christos 22 1.1 christos /* Options for stats_print. */ 23 1.1 christos extern bool opt_stats_print; 24 1.1 christos extern char opt_stats_print_opts[stats_print_tot_num_options+1]; 25 1.1 christos 26 1.1 christos /* Implements je_malloc_stats_print. */ 27 1.1 christos void stats_print(void (*write_cb)(void *, const char *), void *cbopaque, 28 1.1 christos const char *opts); 29 1.1 christos 30 1.1 christos #endif /* JEMALLOC_INTERNAL_STATS_H */ 31