diff options
author | Andrew Au <andrewau@microsoft.com> | 2019-06-04 13:17:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 13:17:51 -0700 |
commit | 902c6b772e9132389cbfea8c759315620e7c0e57 (patch) | |
tree | f62dd96656ee297fbf440148c12d5d7ff2c1e73b /src | |
parent | ed882b151fc20ddaddaabd96bd67b034c6069211 (diff) | |
download | coreclr-902c6b772e9132389cbfea8c759315620e7c0e57.tar.gz coreclr-902c6b772e9132389cbfea8c759315620e7c0e57.tar.bz2 coreclr-902c6b772e9132389cbfea8c759315620e7c0e57.zip |
EventPipe fixes (#24952)
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/eventpipe.cpp | 2 | ||||
-rw-r--r-- | src/vm/eventpipebuffermanager.cpp | 2 | ||||
-rw-r--r-- | src/vm/eventpipesession.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp index 0458be8854..c049244620 100644 --- a/src/vm/eventpipe.cpp +++ b/src/vm/eventpipe.cpp @@ -460,7 +460,7 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback EventPipeSession *EventPipe::GetSession(EventPipeSessionID id) { LIMITED_METHOD_CONTRACT; - _ASSERTE(IsLockOwnedByCurrentThread()); + CrstHolder _crst(GetLock()); if (s_pSessions == nullptr) return nullptr; diff --git a/src/vm/eventpipebuffermanager.cpp b/src/vm/eventpipebuffermanager.cpp index b7351613d5..c3540fc14d 100644 --- a/src/vm/eventpipebuffermanager.cpp +++ b/src/vm/eventpipebuffermanager.cpp @@ -616,7 +616,7 @@ EventPipeEventInstance* EventPipeBufferManager::GetNextEvent() { CONTRACTL { - NOTHROW; + THROWS; GC_NOTRIGGER; MODE_ANY; PRECONDITION(!EventPipe::IsLockOwnedByCurrentThread()); diff --git a/src/vm/eventpipesession.cpp b/src/vm/eventpipesession.cpp index af1a5af212..5d729f6839 100644 --- a/src/vm/eventpipesession.cpp +++ b/src/vm/eventpipesession.cpp @@ -182,7 +182,9 @@ DWORD WINAPI EventPipeSession::ThreadProc(void *args) pEventPipeSession->SetThreadShutdownEvent(); if (!fSuccess) - pEventPipeSession->Disable(); + { + EventPipe::RunWithCallbackPostponed([pEventPipeSession](EventPipeProviderCallbackDataQueue *pEventPipeProviderCallbackDataQueue){pEventPipeSession->Disable();}); + } } EX_CATCH { |