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

Commit f08a5b4

Browse files
authored
Merge pull request #6036 from briansull/dump-fix-inlining
Do not enable the verbose Jit Dump during the inlining decision phase.
2 parents bbb24f9 + ad4a583 commit f08a5b4

File tree

1 file changed

+50
-36
lines changed

1 file changed

+50
-36
lines changed

src/jit/compiler.cpp

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,43 +2081,57 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags)
20812081
{
20822082
LPCWSTR dumpIRFormat = nullptr;
20832083

2084-
if (opts.eeFlags & CORJIT_FLG_PREJIT)
2085-
{
2086-
if (JitConfig.NgenDump().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2087-
verboseDump = true;
2088-
2089-
unsigned ngenHashDumpVal = (unsigned) JitConfig.NgenHashDump();
2090-
if ((ngenHashDumpVal != (DWORD)-1) && (ngenHashDumpVal == info.compMethodHash()))
2091-
verboseDump = true;
2092-
2093-
if (JitConfig.NgenDumpIR().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2094-
dumpIR = true;
2095-
2096-
unsigned ngenHashDumpIRVal = (unsigned) JitConfig.NgenHashDumpIR();
2097-
if ((ngenHashDumpIRVal != (DWORD)-1) && (ngenHashDumpIRVal == info.compMethodHash()))
2098-
dumpIR = true;
2099-
2100-
dumpIRFormat = JitConfig.NgenDumpIRFormat();
2101-
dumpIRPhase = JitConfig.NgenDumpIRPhase();
2102-
}
2103-
else
2084+
// We should only enable 'verboseDump' when we are actually compiling a matching method
2085+
// and not enable it when we are just considering inlining a matching method.
2086+
//
2087+
if (!compIsForInlining())
21042088
{
2105-
if (JitConfig.JitDump().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2106-
verboseDump = true;
2107-
2108-
unsigned jitHashDumpVal = (unsigned) JitConfig.JitHashDump();
2109-
if ((jitHashDumpVal != (DWORD)-1) && (jitHashDumpVal == info.compMethodHash()))
2110-
verboseDump = true;
2111-
2112-
if (JitConfig.JitDumpIR().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2113-
dumpIR = true;
2114-
2115-
unsigned jitHashDumpIRVal = (unsigned) JitConfig.JitHashDumpIR();
2116-
if ((jitHashDumpIRVal != (DWORD)-1) && (jitHashDumpIRVal == info.compMethodHash()))
2117-
dumpIR = true;
2118-
2119-
dumpIRFormat = JitConfig.JitDumpIRFormat();
2120-
dumpIRPhase = JitConfig.JitDumpIRPhase();
2089+
if (opts.eeFlags & CORJIT_FLG_PREJIT)
2090+
{
2091+
if (JitConfig.NgenDump().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2092+
{
2093+
verboseDump = true;
2094+
}
2095+
unsigned ngenHashDumpVal = (unsigned) JitConfig.NgenHashDump();
2096+
if ((ngenHashDumpVal != (DWORD)-1) && (ngenHashDumpVal == info.compMethodHash()))
2097+
{
2098+
verboseDump = true;
2099+
}
2100+
if (JitConfig.NgenDumpIR().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2101+
{
2102+
dumpIR = true;
2103+
}
2104+
unsigned ngenHashDumpIRVal = (unsigned) JitConfig.NgenHashDumpIR();
2105+
if ((ngenHashDumpIRVal != (DWORD)-1) && (ngenHashDumpIRVal == info.compMethodHash()))
2106+
{
2107+
dumpIR = true;
2108+
}
2109+
dumpIRFormat = JitConfig.NgenDumpIRFormat();
2110+
dumpIRPhase = JitConfig.NgenDumpIRPhase();
2111+
}
2112+
else
2113+
{
2114+
if (JitConfig.JitDump().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2115+
{
2116+
verboseDump = true;
2117+
}
2118+
unsigned jitHashDumpVal = (unsigned) JitConfig.JitHashDump();
2119+
if ((jitHashDumpVal != (DWORD)-1) && (jitHashDumpVal == info.compMethodHash()))
2120+
{
2121+
verboseDump = true;
2122+
}
2123+
if (JitConfig.JitDumpIR().contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
2124+
{
2125+
dumpIR = true;
2126+
}
2127+
unsigned jitHashDumpIRVal = (unsigned) JitConfig.JitHashDumpIR();
2128+
if ((jitHashDumpIRVal != (DWORD)-1) && (jitHashDumpIRVal == info.compMethodHash()))
2129+
{
2130+
dumpIR = true;
2131+
}
2132+
dumpIRFormat = JitConfig.JitDumpIRFormat();
2133+
dumpIRPhase = JitConfig.JitDumpIRPhase();
2134+
}
21212135
}
21222136

21232137
if (dumpIRPhase == nullptr)

0 commit comments

Comments
 (0)