Skip to content

Commit d48bafe

Browse files
committed
print statistics nicer
1 parent 02607f2 commit d48bafe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/stats.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static void mi_stat_counter_print_avg(const mi_stat_counter_t* stat, const char*
215215

216216

217217
static void mi_print_header(mi_output_fun* out, void* arg ) {
218-
_mi_fprintf(out, arg, "%10s: %11s %11s %11s %11s %11s\n", "heap stats", "peak ", "total ", "current ", "unit ", "total# ");
218+
_mi_fprintf(out, arg, "%10s: %11s %11s %11s %11s %11s\n", "heap stats", "peak ", "total ", "current ", "block ", "total# ");
219219
}
220220

221221
#if MI_STAT>1
@@ -284,18 +284,18 @@ static void _mi_stats_print(mi_stats_t* stats, mi_output_fun* out0, void* arg0)
284284
// and print using that
285285
mi_print_header(out,arg);
286286
#if MI_STAT>1
287-
mi_stats_print_bins(stats->malloc_bins, MI_BIN_HUGE, "normal",out,arg);
287+
mi_stats_print_bins(stats->malloc_bins, MI_BIN_HUGE, "bin",out,arg);
288288
#endif
289289
#if MI_STAT
290-
mi_stat_print(&stats->malloc_normal, "normal", (stats->malloc_normal_count.total == 0 ? 1 : -1), out, arg);
290+
mi_stat_print(&stats->malloc_normal, "binned", (stats->malloc_normal_count.total == 0 ? 1 : -1), out, arg);
291291
mi_stat_print(&stats->malloc_huge, "huge", (stats->malloc_huge_count.total == 0 ? 1 : -1), out, arg);
292292
mi_stat_count_t total = { 0,0,0 };
293293
mi_stat_count_add_mt(&total, &stats->malloc_normal);
294294
mi_stat_count_add_mt(&total, &stats->malloc_huge);
295295
mi_stat_print_ex(&total, "total", 1, out, arg, "");
296296
#endif
297297
#if MI_STAT>1
298-
mi_stat_print_ex(&stats->malloc_requested, "malloc req", 1, out, arg, "");
298+
mi_stat_peak_print(&stats->malloc_requested, "malloc req", 1, out, arg);
299299
_mi_fprintf(out, arg, "\n");
300300
#endif
301301
mi_stat_print_ex(&stats->reserved, "reserved", 1, out, arg, "");

0 commit comments

Comments
 (0)