Closed Bug 1934108 Opened 2 months ago Closed 7 days ago

Cleanup existing JIT-code preservation code

Categories

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

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(12 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This bug is for tracking some non-functional changes to how JIT code is managed by GC (renaming, documentation comments etc)

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED

There -is- a semantic change here. In GCRuntime::maybeCallGCCallback we save and restore
the gcOptions, lest we re-enter GC. This means there are a couple of possible changes
in behaviour from this change (and I'm honestly not sure which happens here, or
if ultimately this matters at all):

  1. The first option is that as a result of this, a nested GC triggered by a GC
    callback which would have previouly done a 'cleanupEverything' GC no longer
    does, as the nested GC may have a different GCOptions.

  2. The second option is that nested GC could have accidentally been clearing
    the cleanupEverything field, and now it no longer does. As a result we do
    -more- cleanupEverything GC now than we did before.

There -is- a semantic change here. In GCRuntime::maybeCallGCCallback we save and restore
the gcOptions, lest we re-enter GC. This means there are a couple of possible changes
in behaviour from this change (and I'm honestly not sure which happens here, or
if ultimately this matters at all):

  1. The first option is that as a result of this, a nested GC triggered by a GC
    callback which would have previouly done a 'cleanupEverything' GC no longer
    does, as the nested GC may have a different GCOptions.

  2. The second option is that nested GC could have accidentally been clearing
    the cleanupEverything field, and now it no longer does. As a result we do
    -more- cleanupEverything GC now than we did before.

Here we should just straight to forceDiscardJitCode.

No caller ever provides any non-default.

Blocks: GC
Severity: -- → N/A
Priority: -- → P2
Attachment #9440757 - Attachment is obsolete: true
Attachment #9440762 - Attachment is obsolete: true
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/712aad5a0b58 Document why RealmCreationOptions::setPreserveJitCodeExists r=jonco https://hg.mozilla.org/integration/autoland/rev/9ff939988c61 Just check the GC options rather than the cleanUpEverything boolean r=jonco https://hg.mozilla.org/integration/autoland/rev/de793cbd8de5 Remove helper function and explain more directly the heuristics in shouldPreserveJITCode r=jonco https://hg.mozilla.org/integration/autoland/rev/e194475daa2e Document current code preservation reasons r=jonco https://hg.mozilla.org/integration/autoland/rev/7dc64ac5009a Don't bother calling into discardJitCode if we're not preserving any code r=jonco https://hg.mozilla.org/integration/autoland/rev/6ba7346640ee Rename discardJitCode to maybeDiscardJitCode r=jonco https://hg.mozilla.org/integration/autoland/rev/8405785b43b7 Rename DiscardOptions to JitDiscardOptions to make it more clear r=jonco https://hg.mozilla.org/integration/autoland/rev/9c56922c616b Remove JitDiscardOptions from maybeDiscardJitCode r=jonco https://hg.mozilla.org/integration/autoland/rev/a773e246306b Rename discardJITCodeForGC r=jonco https://hg.mozilla.org/integration/autoland/rev/efb91e901151 Detail a comment in forceDiscardJitCode r=jonco https://hg.mozilla.org/integration/autoland/rev/44cadd43898a apply code formatting via Lando
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: