From cd9880b95993abaa3ca1724153acc03221b7b5e4 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Thu, 2 May 2019 13:32:48 -0700 Subject: [PATCH] Make sure the thread running EventPipe::Disable is registered with the thread store so that rundown events can be collected --- src/vm/eventpipe.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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) { -- 2.7.4