Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Send tiered compilation settings rundown event on EventPipe detach #24993

Merged
merged 1 commit into from
Jun 11, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/inc/eventtracebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ namespace ETW

static VOID ProcessShutdown();
static VOID ModuleRangeRundown();
static VOID SendOneTimeRundownEvents();
static VOID StartRundown();
static VOID EndRundown();
static VOID EnumerateForCaptureState();
Expand Down
3 changes: 0 additions & 3 deletions src/vm/eventpipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback
// Log the process information event.
LogProcessInformationEvent(*s_pEventSource);

// Log the runtime information event.
ETW::InfoLog::RuntimeInformation(ETW::InfoLog::InfoStructs::Normal);
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for cleaning this one up too : )


// Disable pSession tracing.
s_pConfig->Disable(*pSession, pEventPipeProviderCallbackDataQueue);
pSession->Disable();
Expand Down
33 changes: 25 additions & 8 deletions src/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3832,6 +3832,27 @@ VOID ETW::EnumerationLog::ModuleRangeRundown()
}


/****************************************************************************/
// Called when ETW is turned ON or OFF on an existing process, to send
// events that are only sent once per rundown
/****************************************************************************/
VOID ETW::EnumerationLog::SendOneTimeRundownEvents()
{
CONTRACTL {
NOTHROW;
GC_TRIGGERS;
} CONTRACTL_END;

// Fire the runtime information event
ETW::InfoLog::RuntimeInformation(ETW::InfoLog::InfoStructs::Callback);

if (ETW::CompilationLog::TieredCompilation::Rundown::IsEnabled() && g_pConfig->TieredCompilation())
{
ETW::CompilationLog::TieredCompilation::Rundown::SendSettings();
}
}


/****************************************************************************/
/* Called when ETW is turned ON on an existing process */
/****************************************************************************/
Expand All @@ -3844,6 +3865,8 @@ VOID ETW::EnumerationLog::StartRundown()

EX_TRY
{
SendOneTimeRundownEvents();

BOOL bIsPerfTrackRundownEnabled = ETW_TRACING_CATEGORY_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_Context,
TRACE_LEVEL_INFORMATION,
CLR_RUNDOWNPERFTRACK_KEYWORD);
Expand Down Expand Up @@ -4016,6 +4039,8 @@ VOID ETW::EnumerationLog::EndRundown()

EX_TRY
{
SendOneTimeRundownEvents();

BOOL bIsPerfTrackRundownEnabled = ETW_TRACING_CATEGORY_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_RUNDOWN_PROVIDER_Context,
TRACE_LEVEL_INFORMATION,
CLR_RUNDOWNPERFTRACK_KEYWORD);
Expand Down Expand Up @@ -4461,14 +4486,6 @@ extern "C"

if(g_fEEStarted && !g_fEEShutDown && bIsRundownTraceHandle)
{
// Fire the runtime information event
ETW::InfoLog::RuntimeInformation(ETW::InfoLog::InfoStructs::Callback);

if (ETW::CompilationLog::TieredCompilation::Rundown::IsEnabled() && g_pConfig->TieredCompilation())
{
ETW::CompilationLog::TieredCompilation::Rundown::SendSettings();
}

// Start and End Method/Module Rundowns
// Used to fire events that we missed since we started the controller after the process started
// flags for immediate start rundown
Expand Down