diff options
author | Eric Wong <e@80x24.org> | 2018-08-11 03:53:36 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-08-11 03:54:03 +0000 |
commit | 85571cb7124a6193e4c6ae57bfed9c62bcb5de0c (patch) | |
tree | 614572ea8203290a08bc18bcb0f31db3f8476993 /ext/mwrap/mwrap.c | |
parent | 8a4345dce4f7512c5e305edf331bd44d671cd72f (diff) | |
download | mwrap-85571cb7124a6193e4c6ae57bfed9c62bcb5de0c.tar.gz |
Including the last rb_gc_count() call would be useful, and avoid showing giant SIZE_MAX initializers for acc.min fields.
Diffstat (limited to 'ext/mwrap/mwrap.c')
-rw-r--r-- | ext/mwrap/mwrap.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c index 138384d..b60c21d 100644 --- a/ext/mwrap/mwrap.c +++ b/ext/mwrap/mwrap.c @@ -1351,21 +1351,26 @@ static void dump_hpb(FILE *fp, unsigned flags) if (flags & DUMP_HPB_STATS) { fprintf(fp, "lifespan_max: %zu\n" - "lifespan_min: %zu\n" + "lifespan_min:%s%zu\n" "lifespan_mean: %0.3f\n" "lifespan_stddev: %0.3f\n" "deathspan_max: %zu\n" - "deathspan_min: %zu\n" + "deathspan_min:%s%zu\n" "deathspan_mean: %0.3f\n" - "deathspan_stddev: %0.3f\n", + "deathspan_stddev: %0.3f\n" + "gc_count: %zu\n", hpb_stats.alive.max, + hpb_stats.alive.min == SIZE_MAX ? " -" : " ", hpb_stats.alive.min, hpb_stats.alive.mean, acc_stddev_dbl(&hpb_stats.alive), hpb_stats.reborn.max, + hpb_stats.reborn.min == SIZE_MAX ? " -" : " ", hpb_stats.reborn.min, hpb_stats.reborn.mean, - acc_stddev_dbl(&hpb_stats.reborn)); + acc_stddev_dbl(&hpb_stats.reborn), + /* n.b.: unsafe to call rb_gc_count() in destructor */ + generation); } if (flags & DUMP_HPB_EACH) { struct alloc_hdr *h; |