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.
fix: update
test.sh
for Node 21 and up output #305New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: update
test.sh
for Node 21 and up output #305Changes from all commits
987596f
88fccc3
1e6dc15
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. It's unfortunate that the function name is lost. Do you have any more info on this V8 change or if there is something we can do to workaround it?
It's good to see the output is the same in older node versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last time I looked at this, I did some playing around and found some weird behavior. #284 somehow restores the function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, hm. I am no v8 expert, but from some quick searches, this could be because v8's optimizer was changed/improved in version 11 (which node21 is using). Since
busyLoop
is in the "hot path", there might be some under the hood optimizations happening to it that hide it from the profiler, which addingnoop
to break it up removes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to dig for a way to force this, it may even require some changes to how
pprof
is being called altogether.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I just proved this too, adding this native syntax yields function name in v21 (without the
noop
function)You have to execute the benchmark with
--allow-natives-syntax
, though.The output:
interesting that there is still one trace that is anonymous, though,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benminer that makes sense and kind of what I figured. Thank you for looking into this. It sounds good to merge this then, I'll let @rohitpruthi-google take it over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing for node 21 because of the error:
Could you please change this to busybench.js here? I am assuming the source reported here is from build files, hence the different extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitpruthi-google Not sure how I missed this, but yes, will fix!