Closed Bug 1509322 Opened 6 years ago Closed 6 years ago

Relax some ChunkPool assertions

Categories

(Core :: JavaScript: GC, enhancement, P3)

61 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

I was investigating what happens when we hit our GC heap limit (in connection with bug 1509318) and saw a very slow shutdown GCs in an optdebug build.

A script to allocate nearly 4GiB of data and the release it took ~20 seconds to allocate and ~15 minutes to free it again.

It seems like the ChunkPool assertions have some quadratic behaviour.
We have contains() and verify() methods that are used on ChunkPools, both of which are linear in the number of chunks in the pool.

I removed verify() from push() and remove() - this still gets called in a few places during GC, just not every time we manipulate the pool.  I also removed a couple of calls to contains() in Chunk::updateChunkListAfterFree() on the grounds that if a chunk is found in one pool is unlikely to be in either of the other pools unless something is broken.

GC now takes only a few seconds in an optdebug build.
Attachment #9026971 - Flags: review?(sphink)
Priority: -- → P3
Comment on attachment 9026971 [details] [diff] [review]
bug1509322-chunkpool-assertions

Shifting review due to Thanksgiving.
Attachment #9026971 - Flags: review?(sphink) → review?(pbone)
Comment on attachment 9026971 [details] [diff] [review]
bug1509322-chunkpool-assertions

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

Thanks makes sense, thanks.
Attachment #9026971 - Flags: review?(pbone) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2094cc4738e8
Relax some ChunkPool assertions which could make debug build GCs very slow r=pbone
https://hg.mozilla.org/mozilla-central/rev/2094cc4738e8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: