Skip to content

Conversation

@davmason
Copy link
Contributor

Fixes #46844

The macros introduced with #46739 had a bug. Because I was on autopilot and used do{...} while(0) in the macros, it introduced a new scope and the ShutdownGuard class would not be held for the duration of the call. I did test it, since it prevented new calls from entering the profiler code it drastically reduced the hit rate but there still was a race condition.

@davmason davmason added this to the 6.0.0 milestone Jan 13, 2021
@davmason davmason requested a review from a team January 13, 2021 08:50
@davmason davmason self-assigned this Jan 13, 2021
@ghost
Copy link

ghost commented Jan 13, 2021

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #46844

The macros introduced with #46739 had a bug. Because I was on autopilot and used do{...} while(0) in the macros, it introduced a new scope and the ShutdownGuard class would not be held for the duration of the call. I did test it, since it prevented new calls from entering the profiler code it drastically reduced the hit rate but there still was a race condition.

Author: davmason
Assignees: davmason
Labels:

area-Diagnostics-coreclr

Milestone: 6.0.0


HRESULT STDMETHODCALLTYPE SlowPathELTProfiler::TailcallCallback(FunctionIDOrClientID functionIdOrClientID, COR_PRF_ELT_INFO eltInfo)
{
SHUTDOWNGUARD();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is superfluous since it's already protected in TailcallStub above.

@davmason davmason linked an issue Jan 13, 2021 that may be closed by this pull request
@davmason davmason merged commit fd744a8 into dotnet:master Jan 13, 2021
@davmason davmason deleted the profiler_sync_2 branch January 20, 2021 08:58
@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure : profiler/elt/slowpatheltleave/slowpatheltleave.sh profiler/elt/slowpatheltenter/slowpatheltenter.sh test failed

3 participants