feat(tasks): track allocations for semantic#13012
Conversation
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 #13012 will not alter performanceComparing Summary
Footnotes |
|
Number of arena reallocations happening in Semantic uses a separate |
5f2d010 to
62f2cc4
Compare
It looks like this would be a pretty non-trivial change. I think we'd need to update the public API to match |
There was a problem hiding this comment.
Pull Request Overview
This PR adds allocation tracking for the Semantic analyzer to the memory allocation tracking task, extending the existing parser allocation tracking functionality.
- Introduces semantic analysis allocation tracking alongside the existing parser tracking
- Refactors the code to support tracking both parser and semantic operations separately
- Creates separate snapshot files for parser and semantic allocation statistics
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tasks/track_memory_allocations/src/lib.rs | Adds semantic tracking logic, refactors stats collection into reusable functions, and creates separate output for parser vs semantic allocations |
| tasks/track_memory_allocations/allocs_semantic.snap | New snapshot file containing semantic allocation statistics |
| tasks/track_memory_allocations/Cargo.toml | Adds oxc_semantic dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
62f2cc4 to
b2a534c
Compare
|
Going to close for now and will revisit at a later point. |

Now that we've tested the allocation tracking for parsing for a while and it has been fairly stable, I'd like to start tracking allocations for Semantic as well. Tracking the arena allocations for semantic is non-trivial unfortunately due to the usage of the allocator internally. Once we can supply an allocator to
SemanticBuilderit will be easy to start tracking allocations.