-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix perfmap output #122273
New 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
Fix perfmap output #122273
Conversation
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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.
Pull request overview
This PR fixes a regression in perfmap output caused by incorrect error checking in fprintf usage. The previous code treated successful writes as errors due to checking if the return value was not equal to zero, when fprintf actually returns the number of characters written (> 0) on success.
Key Changes
- Replaced
fprintf(m_fp, "%s", line.GetUTF8())with a directwrite()system call using the file descriptor - Fixed error checking to properly detect write failures and partial writes
|
cc @huoyaoyuan |
jkotas
left a comment
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!
Fix a recent regression in perfmaps caused by #116203
The fix changes fprintf usage in PerfMap::WriteLine to using