Add a Stencil caching mechanism
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
(Depends on 1 open bug)
Details
Attachments
(4 files)
When delazifying off-thread, the helper thread should provide a set of Stencil which are ready to be merged or instantiated by the main thread.
This implies that the cache is filled by both the main thread and the helper thread(s) and queried when the function is needed in the main thread or needed as this is the parent of a function to be delazified on the helper thread.
Assignee | ||
Comment 1•3 years ago
|
||
This patch add a strucutre which encapsulate a HashMap used to map a single
function to its CompilationStencil. This HashMap is wrapped using an
ExclusiveData Mutex, to ensure that uses are consistent.
To prevent costly uses of Mutexes, when the cache is not meant to be used, a
boolean flag is added as well as a few changes to the ExclusiveData::Guard. It
is extended to allow having a no-op Guard which evaluates to false if the lock
is not taken. In addition, this allow to have an outside scope which wrap all
StencilCache calls, to avoid having a call to clearAndDisable() in the middle.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
This patch adds a function which checks the cache and returns any cached result
from the StencilCache. This function is meant to short-cut the delazification by
looking up functions from the cache.
Assignee | ||
Comment 3•3 years ago
|
||
This patch modifies stencil test cases to add the ability to turn the cache on
and to fill-up this cache prior running the code. The intent being that the
cached code should be used and behave without any differences.
Assignee | ||
Comment 4•3 years ago
|
||
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fbeb3779b64a
https://hg.mozilla.org/mozilla-central/rev/4d00dc052dcc
https://hg.mozilla.org/mozilla-central/rev/b8e34643b725
https://hg.mozilla.org/mozilla-central/rev/430636d4f051
Description
•