diff options
author | Qi Wang <interwq@gwu.edu> | 2017-10-19 19:01:20 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-10-19 23:31:54 (GMT) |
commit | 47203d5f422452def4cb29c0b7128cc068031100 (patch) | |
tree | 7effebff2d7a8d69c743b02c00e31c3d4dfb8b4a | |
parent | d14bbf8d8190df411f0daf182f73f7b7786288c4 (diff) | |
download | jemalloc-47203d5f422452def4cb29c0b7128cc068031100.zip jemalloc-47203d5f422452def4cb29c0b7128cc068031100.tar.gz jemalloc-47203d5f422452def4cb29c0b7128cc068031100.tar.bz2 |
Output all counters for bin mutex stats.
The saved space is not worth the trouble of missing counters.
-rw-r--r-- | src/stats.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/stats.c b/src/stats.c index cbeb923..0847f39 100644 --- a/src/stats.c +++ b/src/stats.c @@ -131,7 +131,8 @@ stats_arena_bins_print(void (*write_cb)(void *, const char *), void *cbopaque, "\t\t\t\t\"bins\": [\n"); } else { char *mutex_counters = " n_lock_ops n_waiting" - " n_spin_acq total_wait_ns max_wait_ns\n"; + " n_spin_acq n_owner_switch total_wait_ns" + " max_wait_ns max_n_thds\n"; malloc_cprintf(write_cb, cbopaque, "bins: size ind allocated nmalloc" " ndalloc nrequests curregs curslabs regs" @@ -234,16 +235,18 @@ stats_arena_bins_print(void (*write_cb)(void *, const char *), void *cbopaque, nregs, slab_size / page, util, nfills, nflushes, nslabs, nreslabs); - /* Output less info for bin mutexes to save space. */ if (mutex) { malloc_cprintf(write_cb, cbopaque, " %12"FMTu64" %12"FMTu64" %12"FMTu64 - " %14"FMTu64" %12"FMTu64"\n", + " %14"FMTu64" %14"FMTu64" %12"FMTu64 + " %10"FMTu64"\n", mutex_stats[mutex_counter_num_ops], mutex_stats[mutex_counter_num_wait], mutex_stats[mutex_counter_num_spin_acq], + mutex_stats[mutex_counter_num_owner_switch], mutex_stats[mutex_counter_total_wait_time], - mutex_stats[mutex_counter_max_wait_time]); + mutex_stats[mutex_counter_max_wait_time], + mutex_stats[mutex_counter_max_num_thds]); } else { malloc_cprintf(write_cb, cbopaque, "\n"); } |