Use a union for jitScript_ and warmUpCount_ fields in JSScript
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(3 files, 1 obsolete file)
The idea is that the warm-up count would be stored in JitScript, but until the script has a JitScript we can store small values directly in JSScript instead of in JitScript. The JITs and Baseline Interpreter rely on JitScript so they will always use the field in JitScript.
This is working towards the design in bug 1529456 comment 1.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Stupid remark.
How high can a warm-up counter reach while stored in the JSScript?
Maybe, we should stop incrementing the warm-up counter when running in interpreter-only mode.
Assignee | ||
Comment 2•5 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #1)
How high can a warm-up counter reach while stored in the JSScript?
Maybe, we should stop incrementing the warm-up counter when running in interpreter-only mode.
Yeah, I think we would limit it to 1000 or so, well within the page size (4096) and good enough for the C++ interpreter.
Assignee | ||
Comment 3•5 years ago
|
||
maybeJitScript() will become a bit slower in the future but many callers know
statically they have a script with a JitScript so by calling jitScript() there
we can avoid the hasJitScript() check in opt builds.
This is also consistent with the baselineScript() and ionScript() accessors.
I renamed jitScript() to jitScriptX() and then fixed all callers to call
the right method.
Assignee | ||
Comment 4•5 years ago
|
||
This makes it easier to change the jitScript_ field in later patches.
Depends on D42288
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
The warm-up count is stored in ScriptWarmUpData until the script is warm
enough for the Baseline Interpreter and the JitScript is created. At that point
we use the warm-up count stored in JitScript.
ScriptWarmUpData uses pointer tagging. This should make it easy to add new
types for LazyScript data in the future.
Comment 7•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e753d23c1237
https://hg.mozilla.org/mozilla-central/rev/5921edc9bf59
Updated•5 years ago
|
Description
•