Asynchronously free executable memory when garbage collecting

NEW
Unassigned

Status

()

Core
JavaScript: GC
P3
normal
9 months ago
2 months ago

People

(Reporter: djvj, Unassigned)

Tracking

({triage-deferred})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 months ago
We seem to free ExecutablePool memory synchronously when discarding jitcode during garbage collection.  This seems to invoke a lot of mprotect() calls when discarding jitcode, which should be avoided during GCs to save time.

We should push as much of the jitcode free logic as possible to deferred (preferably off-main-thread) free code.

Comment 1

9 months ago
Sometimes we do last-ditch GCs to free up executable code, see eg bug 1356631 and bug 1338217 for background.  In that case, freeing doesn't have to happen during GC but it must happen synchronously thereafter.
Keywords: triage-deferred
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.