Fix the nursery's profiling print

RESOLVED FIXED in Firefox 42

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

(Blocks 1 bug)

Trunk
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

Turns out the first column has gotten out of sync with what we're actually printing. This was pushing everything off by one and causing me a tremendous amount of confusion when none of my breakpoints where getting hit. This redesign makes it obvious what belongs with what so that that won't happen again. I also re-munged the spacing so that everything lines up nicely now.
Attachment #8634744 - Flags: review?(jcoppeard)
Comment on attachment 8634744 [details] [diff] [review]
fix_nursery_profiling_print-v0.diff

I forgot that Jon is on PTO this week.
Attachment #8634744 - Flags: review?(jcoppeard) → review?(sphink)
Comment on attachment 8634744 [details] [diff] [review]
fix_nursery_profiling_print-v0.diff

Review of attachment 8634744 [details] [diff] [review]:
-----------------------------------------------------------------

Very nice! Using c++ iterators with auto and an inline-defined struct array with an initializer is really handy.

::: js/src/gc/Nursery.cpp
@@ +577,5 @@
> +            {"logPtT", TIME_TOTAL(logPromotionsToTenured)}
> +        };
> +        static int printedHeader = 0;
> +        if ((printedHeader++ % 200) == 0) {
> +            fprintf(stderr, "MinorGC:               Reason  PRate Size    Time");

This might be a little better as

  fprintf(stderr, "MinorGC: %20s %6s %4s %6s", "Reason", "PRate", "Size", "Time");

to match it up with the later printout. (Though the chances that I have no off-by-ones is vanishingly small, so clearly it doesn't help all that much.)
Attachment #8634744 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/c96fbacf1c7e
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.