Closed Bug 1674465 Opened 1 year ago Closed 1 year ago

Refactor XDR format decision code

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(3 files)

Currently we use the UseOffThreadParseGlobal() flag to decide if we should use stencil or script format for XDR data. As we tune performance of stencil-mvp, it is helpful to have the option of changing the format independant of the parse-global status.

No change to behaviour, but move the exception earlier instead of mutating
CompileOptions after they are saved.

Instead of relying directly on the UseOffThreadParseGlobal() flag to
determine the format of the XDR buffer, refactor to add useStencilXDR
locals to use. In the future, we can hook this to a different condition that
is independant of the parse-global status.

Also move the encoding of stencil until after instantiation for simplicity.
In the past, instantiation would mess with the stencil, but that has been
resolved now.

Depends on D95379

No changes to behaviour. This splits the useOffThreadParseGlobal flag into
cases that care about the format and cases that care about the GC.

Depends on D95380

Here is prototype that stacks on this bug to use stencil format for incremental-xdr even with parse-global enabled.
https://hg.mozilla.org/try/rev/f2e894d567dea67e2f46f9c7ae1262cfad7aa09a

Blocks: 1674305
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f0b90b1cbf4b
Cleanup DecodeMultiScripts handling of off-thread-parse-global. r=arai
https://hg.mozilla.org/integration/autoland/rev/0c96eb1d965a
Refactor XDR script/stencil switching code. r=arai
https://hg.mozilla.org/integration/autoland/rev/6f7804d504b1
Add CompileOptions::useStencilXDR. r=arai
You need to log in before you can comment on or make changes to this bug.