Closed Bug 1835867 Opened 1 year ago Closed 1 year ago

Combine requested heap check with check for nursery allocation allowed

Categories

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

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

(Whiteboard: [sp3])

Attachments

(3 files)

Currently we test whether nursery allocation is allowed for a zone and trace kind, and separately check the requested heap.

We can combine these checks into one by adding a per-zone per-trace kind state which represents whether nursery allocation is allowed for that trace kind in terms of a minimum allowed InitialHeap (i.e. DefaultHeap => nursery allocation allowed, TenuredHeap => not allowed).

We can compare this to the requested InitialHeap value and if the requested value is less than or equal to the minimum then allocate in the nursery. This relies on the value TenuredHeap being greater than DefaultHeap.

This removes some vestiges of nursery canaries that were missed from the
previous bug. Also moves some uncommonly moved method definitions out of line.

Add min heap to tenured state the zone and use it to combine the heap checks.

I'm open to a better name for this.

Depends on D179470

Renames InitialHeap because it's not just used for the initial heap now. Also
makes it into an enum class.

This patch is almost entirely search and replace.

Depends on D179471

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a5748964ba3 Part 1: Remove some remaining parts of nursery canaries and tidy class definition r=sfink https://hg.mozilla.org/integration/autoland/rev/e386c59f1d6e Part 2: Fold requested heap and per-kind nursery allocation allowed check together r=jandem https://hg.mozilla.org/integration/autoland/rev/8f9d8bdcc4cc Part 3: Rename gc::InitialHeap to Heap and make it an enum class r=jandem https://hg.mozilla.org/integration/autoland/rev/4f8fb0745e75 apply code formatting via Lando
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: