Closed Bug 1779583 Opened 2 years ago Closed 2 years ago

Refactor gc::HeapSize to remove the parent link that is unused in most cases

Categories

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

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

The HeapSize class has an optional pointer to a 'parent' HeapSize which is also updated when the heap size changes. This is used to implement a runtime-wide HeapSize that is updated when any per-zone HeapSize is updated.

However this is only used for the HeapSize that relates to the GC heap and none of the other uses. This can be achieved in a different way that doesn't involve conditional updates and embedding null pointers.

This creates a HeapSizeChild subclass that can be used for per-zone GC heap
size tracking. This requires an extra argument to pass the parent HeapSize.
Fortunately that is always to hand in the few places it is needed.

This eliminates the extra parent link in all cases and removes the conditional
update.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd2d3168d396
Refactor gc::HeapSize and split out HeapSizeChild r=sfink
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: