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