Fix the nursery's profiling print

RESOLVED FIXED in Firefox 42

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

(Blocks: 1 bug)

Trunk
mozilla42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8634744 [details] [diff] [review]
fix_nursery_profiling_print-v0.diff

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)
(Assignee)

Comment 1

3 years ago
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
Last Resolved: 3 years ago
status-firefox42: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.