feat(allocator, linter): store worker thread flags in FixedSizeAllocator#13136
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #13136 will not alter performanceComparing Summary
Footnotes
|
3b31b4b to
95015b0
Compare
b70c30d to
dafaf69
Compare
95015b0 to
fce48b1
Compare
fce48b1 to
23f238c
Compare
dafaf69 to
e9809d8
Compare
5f31d1c to
6121c3e
Compare
e9809d8 to
bd5a183
Compare
6121c3e to
802044e
Compare
bd5a183 to
b77bf28
Compare
7358a6c to
694f870
Compare
b77bf28 to
d15c84a
Compare
FixedSizeAllocatorFixedSizeAllocator
d15c84a to
1dfaa2f
Compare
694f870 to
0777540
Compare
0777540 to
deacd22
Compare
1dfaa2f to
317698d
Compare

Prepare the way for running JS linter plugins on multiple threads.
Previously we only had to track whether an
Allocator's memory was shared with JS main thread or not, so a single flag was sufficient. Once we have plugins running on multiple worker threads, we need to track for eachAllocatorwhich JS threads it's been shared with, so can avoid sending the same buffer to the same thread twice.Store this info as a series of
bools stored at the end of theAllocator's memory.FixedAllocator::newinitializes all these flags asfalsewhen theAllocatoris created, and linter checks the flag for the specific thread when it wants to share data with that thread, and sets it totrueonce buffer has been sent to that thread.