Closed Bug 2072723 Opened 2 months ago Closed 1 month ago

Integrate tracing of buffer edges with existing tracing system

Categories

(Core :: JavaScript: GC, task, P2)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(4 external files)

Currently edges to buffer allocators are traced in a different way to edges to GC cells. This bug aims to make these more similar by adding a virtual method to JSTracer which gets called for buffer edges.

This adds a new virtual method to JSTracer which is called on buffer edges. The
default implementation is to do nothing so most existing tracers are not
affected.

This also changes the signature of TraceBufferEdge to return void like TraceEdge.

Currently the buffer allocator switches on the tracer kind when tracing a
buffer edge. The patch changes this to use virtual dispatch on the tracer to
decide what to do.

This splits BufferAllocator::TraceEdge into MarkBuffer and PromoteBuffer.

Currently we call the buffer marking functions when allocating nursery buffers
during GC, to ensure the new buffer survives. This changes things so we set the
marked flag directly when necessary.

Finally we can rename marking methods that are only used to promote nursery
owned buffers.

Severity: -- → N/A
Priority: -- → P2
Pushed by jcoppeard@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5de31c5a79f4 https://hg.mozilla.org/integration/autoland/rev/06c3536ee53f Part 1: Add onBufferEdge method to JSTracer r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/0d090cfbbe8d https://hg.mozilla.org/integration/autoland/rev/465d51b04066 Part 2: Use tracer dispatch to call the relevant buffer allocator methods r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/2bf8cdeb2095 https://hg.mozilla.org/integration/autoland/rev/01da6a89a998 Part 3: Move marking barrier into alloc functions r=spidermonkey-reviewers,jandem https://github.com/mozilla-firefox/firefox/commit/9a10c492e299 https://hg.mozilla.org/integration/autoland/rev/428690fb684f Part 4: Rename some buffer allocator marking methods to 'promote' r=spidermonkey-reviewers,jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: