Sweeping happens at an awkward time during collection due to the fact that destructors can cause arbitrary reentry into the VM. If we were to delay sweeping until after collection was completely finished then we would no longer have this problem.
Created attachment 220488 [details]
Comment on attachment 220488 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=220488&action=review
> + SamplingRegion samplingRegion("Garbage Collection: Sweeping");
Sampling region should probably go before DelayedReleaseScope, so we sample all destructor time, including delayed destructor time.
Committed r161429: <http://trac.webkit.org/changeset/161429>