Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 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
8 changes: 8 additions & 0 deletions src/coreclr/vm/ClrEtwAll.man
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@
<map value="0x0" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
<map value="0x4" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.TieredPGOMapMessage)"/>
<map value="0x8" message="$(string.RuntimePublisher.TieredCompilationSettingsFlags.ReadyToRunMapMessage)"/>
</bitMap>
</maps>

Expand Down Expand Up @@ -4365,6 +4367,8 @@
<map value="0x0" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage)"/>
<map value="0x1" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage)"/>
<map value="0x2" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage)"/>
<map value="0x4" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.TieredPGOMapMessage)"/>
<map value="0x8" message="$(string.RundownPublisher.TieredCompilationSettingsFlags.ReadyToRunMapMessage)"/>
</bitMap>
</maps>

Expand Down Expand Up @@ -8865,6 +8869,8 @@
<string id="RuntimePublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.TieredPGOMapMessage" value="TieredPGO" />
<string id="RuntimePublisher.TieredCompilationSettingsFlags.ReadyToRunMapMessage" value="ReadyToRun" />
<string id="RuntimePublisher.KnownPathSource.ApplicationAssembliesMessage" value="ApplicationAssemblies" />
<string id="RuntimePublisher.KnownPathSource.UnusedMessage" value="Unused" />
<string id="RuntimePublisher.KnownPathSource.AppPathsMessage" value="AppPaths" />
Expand Down Expand Up @@ -8934,6 +8940,8 @@
<string id="RundownPublisher.TieredCompilationSettingsFlags.NoneMapMessage" value="None" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitMapMessage" value="QuickJit" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.QuickJitForLoopsMapMessage" value="QuickJitForLoops" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.TieredPGOMapMessage" value="TieredPGO" />
<string id="RundownPublisher.TieredCompilationSettingsFlags.ReadyToRunMapMessage" value="ReadyToRun" />

<string id="PrivatePublisher.ModuleRangeSectionTypeMap.ModuleSection" value="ModuleSection"/>
<string id="PrivatePublisher.ModuleRangeSectionTypeMap.EETableSection" value="EETableSection"/>
Expand Down
8 changes: 7 additions & 1 deletion src/coreclr/vm/eeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ HRESULT EEConfig::Init()
fTieredPGO = false;
#endif

fReadyToRun = false;

#if defined(FEATURE_ON_STACK_REPLACEMENT)
dwOSR_HitLimit = 10;
dwOSR_CounterBump = 5000;
Expand Down Expand Up @@ -477,7 +479,7 @@ HRESULT EEConfig::sync()

pReadyToRunExcludeList = NULL;
#if defined(FEATURE_READYTORUN)
if (ReadyToRunInfo::IsReadyToRunEnabled())
if (g_pConfig->ReadyToRun())
Comment thread
eduardo-vp marked this conversation as resolved.
Outdated
Comment thread
eduardo-vp marked this conversation as resolved.
Outdated
{
NewArrayHolder<WCHAR> wszReadyToRunExcludeList;
IfFailRet(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_ReadyToRunExcludeList, &wszReadyToRunExcludeList));
Expand Down Expand Up @@ -777,6 +779,10 @@ HRESULT EEConfig::sync()
fTieredPGO = Configuration::GetKnobBooleanValue(W("System.Runtime.TieredPGO"), CLRConfig::EXTERNAL_TieredPGO);
#endif

#if defined(FEATURE_READYTORUN)
fReadyToRun = g_pConfig->ReadyToRun();
Comment thread
eduardo-vp marked this conversation as resolved.
Outdated
#endif

#if defined(FEATURE_ON_STACK_REPLACEMENT)
dwOSR_HitLimit = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_OSR_HitLimit);
dwOSR_CounterBump = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_OSR_CounterBump);
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/eeconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class EEConfig
bool TieredPGO(void) const { LIMITED_METHOD_CONTRACT; return fTieredPGO; }
#endif

bool ReadyToRun(void) const { LIMITED_METHOD_CONTRACT; return fReadyToRun; }

#if defined(FEATURE_ON_STACK_REPLACEMENT)
// OSR Config
DWORD OSR_CounterBump() const { LIMITED_METHOD_CONTRACT; return dwOSR_CounterBump; }
Expand Down Expand Up @@ -656,6 +658,8 @@ class EEConfig
bool fTieredPGO;
#endif

bool fReadyToRun;
Comment thread
eduardo-vp marked this conversation as resolved.

#if defined(FEATURE_ON_STACK_REPLACEMENT)
DWORD dwOSR_HitLimit;
DWORD dwOSR_CounterBump;
Expand Down
12 changes: 12 additions & 0 deletions src/coreclr/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7636,6 +7636,8 @@ void ETW::CompilationLog::TieredCompilation::GetSettings(UINT32 *flagsRef)
None = 0x0,
QuickJit = 0x1,
QuickJitForLoops = 0x2,
TieredPGO = 0x4,
ReadyToRun = 0x8,
};

UINT32 flags = (UINT32)Flags::None;
Expand All @@ -7647,6 +7649,16 @@ void ETW::CompilationLog::TieredCompilation::GetSettings(UINT32 *flagsRef)
flags |= (UINT32)Flags::QuickJitForLoops;
}
}
#ifdef FEATURE_PGO
if (g_pConfig->TieredPGO())
Comment thread
eduardo-vp marked this conversation as resolved.
{
flags |= (UINT32)Flags::TieredPGO;
}
#endif
if (g_pConfig->ReadyToRun())
{
flags |= (UINT32)Flags::ReadyToRun;
}
*flagsRef = flags;
}

Expand Down
10 changes: 1 addition & 9 deletions src/coreclr/vm/readytoruninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,6 @@ void ReadyToRunInfo::SetMethodDescForEntryPointInNativeImage(PCODE entryPoint, M
}
}

BOOL ReadyToRunInfo::IsReadyToRunEnabled()
Comment thread
eduardo-vp marked this conversation as resolved.
{
WRAPPER_NO_CONTRACT;

static ConfigDWORD configReadyToRun;
return configReadyToRun.val(CLRConfig::EXTERNAL_ReadyToRun);
}

// A log file to record success/failure of R2R loads. s_r2rLogFile can have the following values:
// -1: Logging not yet initialized.
// NULL: Logging disabled.
Expand All @@ -414,7 +406,7 @@ static void LogR2r(const char *msg, PEAssembly *pPEAssembly)
else
r2rLogFile = NULL;

if (r2rLogFile != NULL && !ReadyToRunInfo::IsReadyToRunEnabled())
if (r2rLogFile != NULL && !g_pConfig->ReadyToRun())
{
fputs("Ready to Run not enabled.\n", r2rLogFile);
fclose(r2rLogFile);
Expand Down