Stats, CTL: Expose new tcache settings.
This commit is contained in:
parent
ee72bf1cfd
commit
7503b5b33a
28
src/ctl.c
28
src/ctl.c
@ -103,9 +103,15 @@ CTL_PROTO(opt_zero)
|
|||||||
CTL_PROTO(opt_utrace)
|
CTL_PROTO(opt_utrace)
|
||||||
CTL_PROTO(opt_xmalloc)
|
CTL_PROTO(opt_xmalloc)
|
||||||
CTL_PROTO(opt_tcache)
|
CTL_PROTO(opt_tcache)
|
||||||
|
CTL_PROTO(opt_lg_tcache_max)
|
||||||
|
CTL_PROTO(opt_tcache_nslots_small_min)
|
||||||
|
CTL_PROTO(opt_tcache_nslots_small_max)
|
||||||
|
CTL_PROTO(opt_tcache_nslots_large)
|
||||||
|
CTL_PROTO(opt_lg_tcache_nslots_mul)
|
||||||
|
CTL_PROTO(opt_tcache_gc_incr_bytes)
|
||||||
|
CTL_PROTO(opt_tcache_gc_delay_bytes)
|
||||||
CTL_PROTO(opt_thp)
|
CTL_PROTO(opt_thp)
|
||||||
CTL_PROTO(opt_lg_extent_max_active_fit)
|
CTL_PROTO(opt_lg_extent_max_active_fit)
|
||||||
CTL_PROTO(opt_lg_tcache_max)
|
|
||||||
CTL_PROTO(opt_prof)
|
CTL_PROTO(opt_prof)
|
||||||
CTL_PROTO(opt_prof_prefix)
|
CTL_PROTO(opt_prof_prefix)
|
||||||
CTL_PROTO(opt_prof_active)
|
CTL_PROTO(opt_prof_active)
|
||||||
@ -340,9 +346,17 @@ static const ctl_named_node_t opt_node[] = {
|
|||||||
{NAME("utrace"), CTL(opt_utrace)},
|
{NAME("utrace"), CTL(opt_utrace)},
|
||||||
{NAME("xmalloc"), CTL(opt_xmalloc)},
|
{NAME("xmalloc"), CTL(opt_xmalloc)},
|
||||||
{NAME("tcache"), CTL(opt_tcache)},
|
{NAME("tcache"), CTL(opt_tcache)},
|
||||||
|
{NAME("lg_tcache_max"), CTL(opt_lg_tcache_max)},
|
||||||
|
{NAME("tcache_nslots_small_min"),
|
||||||
|
CTL(opt_tcache_nslots_small_min)},
|
||||||
|
{NAME("tcache_nslots_small_max"),
|
||||||
|
CTL(opt_tcache_nslots_small_max)},
|
||||||
|
{NAME("tcache_nslots_large"), CTL(opt_tcache_nslots_large)},
|
||||||
|
{NAME("lg_tcache_nslots_mul"), CTL(opt_lg_tcache_nslots_mul)},
|
||||||
|
{NAME("tcache_gc_incr_bytes"), CTL(opt_tcache_gc_incr_bytes)},
|
||||||
|
{NAME("tcache_gc_delay_bytes"), CTL(opt_tcache_gc_delay_bytes)},
|
||||||
{NAME("thp"), CTL(opt_thp)},
|
{NAME("thp"), CTL(opt_thp)},
|
||||||
{NAME("lg_extent_max_active_fit"), CTL(opt_lg_extent_max_active_fit)},
|
{NAME("lg_extent_max_active_fit"), CTL(opt_lg_extent_max_active_fit)},
|
||||||
{NAME("lg_tcache_max"), CTL(opt_lg_tcache_max)},
|
|
||||||
{NAME("prof"), CTL(opt_prof)},
|
{NAME("prof"), CTL(opt_prof)},
|
||||||
{NAME("prof_prefix"), CTL(opt_prof_prefix)},
|
{NAME("prof_prefix"), CTL(opt_prof_prefix)},
|
||||||
{NAME("prof_active"), CTL(opt_prof_active)},
|
{NAME("prof_active"), CTL(opt_prof_active)},
|
||||||
@ -1793,10 +1807,18 @@ CTL_RO_NL_CGEN(config_fill, opt_zero, opt_zero, bool)
|
|||||||
CTL_RO_NL_CGEN(config_utrace, opt_utrace, opt_utrace, bool)
|
CTL_RO_NL_CGEN(config_utrace, opt_utrace, opt_utrace, bool)
|
||||||
CTL_RO_NL_CGEN(config_xmalloc, opt_xmalloc, opt_xmalloc, bool)
|
CTL_RO_NL_CGEN(config_xmalloc, opt_xmalloc, opt_xmalloc, bool)
|
||||||
CTL_RO_NL_GEN(opt_tcache, opt_tcache, bool)
|
CTL_RO_NL_GEN(opt_tcache, opt_tcache, bool)
|
||||||
|
CTL_RO_NL_GEN(opt_lg_tcache_max, opt_lg_tcache_max, ssize_t)
|
||||||
|
CTL_RO_NL_GEN(opt_tcache_nslots_small_min, opt_tcache_nslots_small_min,
|
||||||
|
unsigned)
|
||||||
|
CTL_RO_NL_GEN(opt_tcache_nslots_small_max, opt_tcache_nslots_small_max,
|
||||||
|
unsigned)
|
||||||
|
CTL_RO_NL_GEN(opt_tcache_nslots_large, opt_tcache_nslots_large, unsigned)
|
||||||
|
CTL_RO_NL_GEN(opt_lg_tcache_nslots_mul, opt_lg_tcache_nslots_mul, ssize_t)
|
||||||
|
CTL_RO_NL_GEN(opt_tcache_gc_incr_bytes, opt_tcache_gc_incr_bytes, size_t)
|
||||||
|
CTL_RO_NL_GEN(opt_tcache_gc_delay_bytes, opt_tcache_gc_delay_bytes, size_t)
|
||||||
CTL_RO_NL_GEN(opt_thp, thp_mode_names[opt_thp], const char *)
|
CTL_RO_NL_GEN(opt_thp, thp_mode_names[opt_thp], const char *)
|
||||||
CTL_RO_NL_GEN(opt_lg_extent_max_active_fit, opt_lg_extent_max_active_fit,
|
CTL_RO_NL_GEN(opt_lg_extent_max_active_fit, opt_lg_extent_max_active_fit,
|
||||||
size_t)
|
size_t)
|
||||||
CTL_RO_NL_GEN(opt_lg_tcache_max, opt_lg_tcache_max, ssize_t)
|
|
||||||
CTL_RO_NL_CGEN(config_prof, opt_prof, opt_prof, bool)
|
CTL_RO_NL_CGEN(config_prof, opt_prof, opt_prof, bool)
|
||||||
CTL_RO_NL_CGEN(config_prof, opt_prof_prefix, opt_prof_prefix, const char *)
|
CTL_RO_NL_CGEN(config_prof, opt_prof_prefix, opt_prof_prefix, const char *)
|
||||||
CTL_RO_NL_CGEN(config_prof, opt_prof_active, opt_prof_active, bool)
|
CTL_RO_NL_CGEN(config_prof, opt_prof_active, opt_prof_active, bool)
|
||||||
|
@ -1107,6 +1107,12 @@ stats_general_print(emitter_t *emitter) {
|
|||||||
OPT_WRITE_BOOL("xmalloc")
|
OPT_WRITE_BOOL("xmalloc")
|
||||||
OPT_WRITE_BOOL("tcache")
|
OPT_WRITE_BOOL("tcache")
|
||||||
OPT_WRITE_SSIZE_T("lg_tcache_max")
|
OPT_WRITE_SSIZE_T("lg_tcache_max")
|
||||||
|
OPT_WRITE_UNSIGNED("tcache_nslots_small_min")
|
||||||
|
OPT_WRITE_UNSIGNED("tcache_nslots_small_max")
|
||||||
|
OPT_WRITE_UNSIGNED("tcache_nslots_large")
|
||||||
|
OPT_WRITE_SSIZE_T("lg_tcache_nslots_mul")
|
||||||
|
OPT_WRITE_SIZE_T("tcache_gc_incr_bytes")
|
||||||
|
OPT_WRITE_SIZE_T("tcache_gc_delay_bytes")
|
||||||
OPT_WRITE_CHAR_P("thp")
|
OPT_WRITE_CHAR_P("thp")
|
||||||
OPT_WRITE_BOOL("prof")
|
OPT_WRITE_BOOL("prof")
|
||||||
OPT_WRITE_CHAR_P("prof_prefix")
|
OPT_WRITE_CHAR_P("prof_prefix")
|
||||||
|
12
src/tcache.c
12
src/tcache.c
@ -33,6 +33,12 @@ unsigned opt_tcache_nslots_large = 20;
|
|||||||
*/
|
*/
|
||||||
ssize_t opt_lg_tcache_nslots_mul = -1;
|
ssize_t opt_lg_tcache_nslots_mul = -1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Number of allocation bytes between tcache incremental GCs. Again, this
|
||||||
|
* default just seems to work well; more tuning is possible.
|
||||||
|
*/
|
||||||
|
size_t opt_tcache_gc_incr_bytes = 65536;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* With default settings, we may end up flushing small bins frequently with
|
* With default settings, we may end up flushing small bins frequently with
|
||||||
* small flush amounts. To limit this tendency, we can set a number of bytes to
|
* small flush amounts. To limit this tendency, we can set a number of bytes to
|
||||||
@ -47,12 +53,6 @@ ssize_t opt_lg_tcache_nslots_mul = -1;
|
|||||||
*/
|
*/
|
||||||
size_t opt_tcache_gc_delay_bytes = 0;
|
size_t opt_tcache_gc_delay_bytes = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* Number of allocation bytes between tcache incremental GCs. Again, this
|
|
||||||
* default just seems to work well; more tuning is possible.
|
|
||||||
*/
|
|
||||||
size_t opt_tcache_gc_incr_bytes = 65536;
|
|
||||||
|
|
||||||
cache_bin_info_t *tcache_bin_info;
|
cache_bin_info_t *tcache_bin_info;
|
||||||
|
|
||||||
/* Total stack size required (per tcache). Include the padding above. */
|
/* Total stack size required (per tcache). Include the padding above. */
|
||||||
|
Loading…
Reference in New Issue
Block a user