Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove logging that could occur while a thread is suspended #2014

Merged
merged 3 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Add sampling configuration for profiling (#2004)

### Fixes

- Remove logging that could occur while a thread is suspended (#2014)

## 7.22.0

### Features
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/SentryThreadHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ namespace profiling {
if (handle_ == THREAD_NULL) {
return false;
}
return SENTRY_PROF_LOG_KERN_RETURN(thread_suspend(handle_)) == KERN_SUCCESS;
return thread_suspend(handle_) == KERN_SUCCESS;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could eventually store the errno and log it after resuming the thread as well.

}

bool
Expand All @@ -249,7 +249,7 @@ namespace profiling {
if (handle_ == THREAD_NULL) {
return false;
}
return SENTRY_PROF_LOG_KERN_RETURN(thread_resume(handle_)) == KERN_SUCCESS;
return thread_resume(handle_) == KERN_SUCCESS;
}

bool
Expand Down