Closed Bug 1415721 Opened 5 years ago Closed 1 month ago

Revisit where to call SweepScriptData

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
thunderbird_esr52 --- wontfix
firefox-esr52 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox104 --- fixed

People

(Reporter: tcampbell, Assigned: jonco)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/c99d035f00dd894feff38e4ad28a73fb679c63a6/js/src/jsgc.cpp#6484-6490

This comment - added over a decade ago - gives reasons why SweepScriptData should be deferred to this point. The destroyScriptHook no longer exists, and the SharedScriptData no longer contains any filenames (it has bytecode, atom references, and srcnotes). As a result there may be a more optimal place to call SweepScriptData. This involves scanning a hashmap of all bytecode in the runtime and then calling js_free for some of them.
Paul, perhaps this is a more relevant exercise for you than for me.
Assignee: nobody → pbone
Priority: -- → P3
Thanks.  I'll take a look some time, but it looks like there's no hurry for this. is that right?
Flags: needinfo?(tcampbell)
No hurry. Just another potential item for gc cleanup / parallel tasks.
Flags: needinfo?(tcampbell)
(In reply to Ted Campbell [:tcampbell] from comment #0)
Hah, that comment is just meaningless now.

We sweep scripts incrementally in the foreground so perhaps it would be possible to remove the entries from this table as we go.
Assignee: pbone → cduan

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: f103119 → nobody
Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/567988aea937
Update outdated comment about when to sweep shared script data r=sfink
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.