Repository navigation
Conversation
The sync fs, fs dir, AsyncWrap and vm.Script tracing guards called TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED directly, which does a by-name search in the tracing controller on every call. Use TRACE_EVENT_CATEGORY_ENABLED instead, which caches the category pointer per call site like the other TRACE_EVENT macros. Perfetto already provides it; add an equivalent for the legacy tracing build. Assisted-by: claude:opus-5.5 Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67502 +/- ##
==========================================
- Coverage 90.66% 90.66% -0.01%
==========================================
Files 799 799
Lines 280245 280242 -3
Branches 54121 54123 +2
==========================================
- Hits 254097 254094 -3
Misses 16277 16277
Partials 9871 9871
🚀 New features to boost your workflow:
|
jasnell
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sync fs, fs dir, AsyncWrap and vm.Script tracing guards call
TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLEDdirectly, which does a by-name search in the tracing controller on every callUse
TRACE_EVENT_CATEGORY_ENABLEDinstead, which caches the category pointer per call site like the otherTRACE_EVENTmacros. Perfetto already provides it, so add an equivalent for the legacy tracing buildbenchmark/compare.js, 30 runs:fs/bench-statSync.jsfstatSynclstatSyncstatSyncfs/bench-existsSync.jsexistingnon-existingnon-flat-existingfs/bench-accessSync.jsaccessSyncexistingaccessSyncnon-existingaccessSyncnon-flat-existingfs/bench-statSync-failure.jsnoThrowlstatSyncnoThrowstatSyncthrowfstatSyncthrowlstatSyncthrowstatSyncfs/bench-openSync.js,fs/bench-opendirSync.jsand the asyncfs/bench-stat.jsare within noise.