Skip to content

feat(allocator, linter): store worker thread flags in FixedSizeAllocator#13136

Closed
overlookmotel wants to merge 1 commit into08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_from
08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_
Closed

feat(allocator, linter): store worker thread flags in FixedSizeAllocator#13136
overlookmotel wants to merge 1 commit into08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_from
08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 15, 2025

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 each Allocator which 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 the Allocator's memory. FixedAllocator::new initializes all these flags as false when the Allocator is created, and linter checks the flag for the specific thread when it wants to share data with that thread, and sets it to true once buffer has been sent to that thread.

Copy link
Member Author

overlookmotel commented Aug 15, 2025

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.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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-hq
Copy link

codspeed-hq bot commented Aug 15, 2025

CodSpeed Instrumentation Performance Report

Merging #13136 will not alter performance

Comparing 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ (317698d) with main (8b1e022)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ (deacd22) during the generation of this report, so main (8b1e022) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from 3b31b4b to 95015b0 Compare August 15, 2025 23:53
@overlookmotel overlookmotel force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch 2 times, most recently from b70c30d to dafaf69 Compare August 16, 2025 00:12
@overlookmotel overlookmotel force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from 95015b0 to fce48b1 Compare August 16, 2025 00:12
@graphite-app graphite-app bot force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from fce48b1 to 23f238c Compare August 16, 2025 12:02
@graphite-app graphite-app bot force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from dafaf69 to e9809d8 Compare August 16, 2025 12:02
@graphite-app graphite-app bot force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch 2 times, most recently from 5f31d1c to 6121c3e Compare August 16, 2025 12:19
@graphite-app graphite-app bot force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from e9809d8 to bd5a183 Compare August 16, 2025 12:19
@overlookmotel overlookmotel force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from 6121c3e to 802044e Compare August 16, 2025 18:10
@overlookmotel overlookmotel force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from bd5a183 to b77bf28 Compare August 16, 2025 18:10
@graphite-app graphite-app bot force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch 2 times, most recently from 7358a6c to 694f870 Compare August 17, 2025 13:30
@graphite-app graphite-app bot force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from b77bf28 to d15c84a Compare August 17, 2025 13:30
@overlookmotel overlookmotel changed the title feat(allocator): store worker thread flags in FixedSizeAllocator feat(allocator, linter): store worker thread flags in FixedSizeAllocator Aug 19, 2025
@overlookmotel overlookmotel force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from d15c84a to 1dfaa2f Compare August 19, 2025 21:38
@overlookmotel overlookmotel force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from 694f870 to 0777540 Compare August 19, 2025 21:38
@overlookmotel overlookmotel force-pushed the 08-14-refactor_allocator_linter_add_ref_counter_to_fixedsizeallocator_ branch from 0777540 to deacd22 Compare August 20, 2025 22:44
@overlookmotel overlookmotel force-pushed the 08-14-feat_allocator_store_worker_thread_flags_in_fixedsizeallocator_ branch from 1dfaa2f to 317698d Compare August 20, 2025 22:44
@overlookmotel overlookmotel self-assigned this Sep 10, 2025
@Boshen Boshen closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants