Open Bug 1991501 Opened 4 months ago Updated 2 months ago

Investigate WeakSet overhead on babel-wtb and babel-minify-wtb tests in JetStream 3

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: jandem, Unassigned)

References

(Blocks 1 open bug)

Details

This test is adding a lot of values to a WeakSet.

I'm seeing some time in jemalloc allocating memory for the underlying hash table (using the buffer allocator for Weak{Map,Set} buffers might help there). Also some post barrier time and FULL_VALUE_BUFFER nursery GCs that I think are also related.

The babel-wtb test is similar.

Summary: Investigate WeakSet overhead on babel-minify-wtb test in JetStream 3 → Investigate WeakSet overhead on babel-wtb and babel-minify-wtb tests in JetStream 3

Maybe nursery-allocating the WeakSet objects would help if we can avoid the store buffer entries in that case, but I haven't checked what the lifetime of these objects is.

Severity: -- → N/A
Priority: -- → P2

(In reply to Jan de Mooij [:jandem] from comment #0)

using the buffer allocator for Weak{Map,Set} buffers might help there

I had a go at doing this but it's complicated because sometimes weak maps are owned by GC things and have GC lifetime and sometimes they are embedded in data structures allocated on the C++ heap which don't. Giving the table GC lifetime will would allow the WeakMap destructor to observe dangling pointers in the latter case.

Depends on: 1995021

Bug 1995021 improved these tests by 5-17%. Nice!

You need to log in before you can comment on or make changes to this bug.