Closed Bug 1575188 Opened 2 years ago Closed 2 years ago

Optimize AutoWritableJitCode use in JitCode::traceChildren

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

In JitCode::traceChildren we use AutoWritableJitCode only if we're doing a nursery or compacting GC, but we can do better than that if we use Maybe<AutoWritableJitCode> in TraceDataRelocations and emplace() it only if the GC actually moved something.

We now only construct AutoWritableJitCode if a pointer embedded in the code
needs to be updated, instead of always when we are doing a compacting or nursery
GC. This matters because mprotect (twice) is pretty slow.

Priority: -- → P1
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f7c67f05fb3
Optimize AutoWritableJitCode use in JitCode::traceChildren. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.