Closed Bug 1257496 Opened 4 years ago Closed 4 years ago

Add information about cycle count and GC state to our GC stats

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

Attached patch improve-gc-statsSplinter Review
Add some more information to our GC statistics.  The cycle count is useful to see if we're running more than one cycle in a slice, and the GC state makes it easier to see the progress of the GC.
Attachment #8731663 - Flags: review?(sphink)
Comment on attachment 8731663 [details] [diff] [review]
improve-gc-stats

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

That's really nice.

::: js/src/jsgc.cpp
@@ +7796,5 @@
> +        "Sweep",
> +        "Finalize",
> +        "Compact"
> +    };
> +    MOZ_ASSERT(ArrayLength(names) == NUM_STATES);

s/MOZ_ASSERT/static_assert/, if ArrayLength allows it.
Attachment #8731663 - Flags: review?(sphink) → review+
(In reply to Steve Fink [:sfink:, :s:] from comment #1)
> s/MOZ_ASSERT/static_assert/, if ArrayLength allows it.

It turns out that doesn't compile on Windows platforms due to some error about it not being a constant expression.
https://hg.mozilla.org/mozilla-central/rev/3cb3eb37b811
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.