From: Andrew Au Date: Thu, 2 May 2019 20:32:48 +0000 (-0700) Subject: Make sure the thread running EventPipe::Disable is registered with the thread store... X-Git-Tag: accepted/tizen/unified/20190813.215958~42^2~326 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd9880b95993abaa3ca1724153acc03221b7b5e4;p=platform%2Fupstream%2Fcoreclr.git Make sure the thread running EventPipe::Disable is registered with the thread store so that rundown events can be collected --- diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp index fab4116..d3720bb 100644 --- a/src/vm/eventpipe.cpp +++ b/src/vm/eventpipe.cpp @@ -341,6 +341,8 @@ void EventPipe::Disable(EventPipeSessionID id) } CONTRACTL_END; + SetupThread(); + // Only perform the disable operation if the session ID // matches the current active session. if (id != (EventPipeSessionID)s_pSession) @@ -752,11 +754,7 @@ void EventPipe::WriteEventInternal(EventPipeEvent &event, EventPipeEventPayload } else if (s_pConfig->RundownEnabled()) { - if (pThread == nullptr) - { - return; - } - + _ASSERTE(pThread != nullptr); BYTE *pData = payload.GetFlatData(); if (pData != NULL) {