Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Address feedback
  • Loading branch information
EgorBo committed Nov 4, 2021
commit 3ca405acab2500946244a1f70158cb417c0f30e3
2 changes: 1 addition & 1 deletion src/coreclr/jit/fginline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ PhaseStatus Compiler::fgInline()
{
JITDUMP("**************** Inline Tree");
printf("\n");
m_inlineStrategy->Dump(verbose);
m_inlineStrategy->Dump(verbose || JitConfig.JitPrintInlinedMethodsVerbose());
}

#endif // DEBUG
Expand Down
22 changes: 10 additions & 12 deletions src/coreclr/jit/inline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,14 @@ InlineContext::InlineContext(InlineStrategy* strategy)
//
// Arguments:
// indent - indentation level for this node
// verbose - more verbose output if true

void InlineContext::Dump(unsigned indent)
void InlineContext::Dump(bool verbose, unsigned indent)
{
// Handle fact that siblings are in reverse order.
if (m_Sibling != nullptr)
{
m_Sibling->Dump(indent);
m_Sibling->Dump(verbose, indent);
}

// We may not know callee name in some of the failing cases
Expand All @@ -386,16 +387,13 @@ void InlineContext::Dump(unsigned indent)

mdMethodDef calleeToken = compiler->info.compCompHnd->getMethodDefFromMethod(m_Callee);

// Add more information when verbose mode or NgenDump/JitDump are set
bool verboseMode = (compiler->verbose) || (JitConfig.JitPrintInlinedMethodsVerbose() > 0);

// Dump this node
if (m_Parent == nullptr)
{
// Root method
InlinePolicy* policy = InlinePolicy::GetPolicy(compiler, true);

if (verboseMode)
if (verbose)
{
printf("\nInlines into %08X [via %s] %s:\n", calleeToken, policy->GetName(), calleeName);
}
Expand All @@ -414,7 +412,7 @@ void InlineContext::Dump(unsigned indent)
const char* guarded = m_Guarded ? " GUARDED" : "";
const char* unboxed = m_Unboxed ? " UNBOXED" : "";

if (verboseMode)
if (verbose)
{
if (m_Offset == BAD_IL_OFFSET)
{
Expand All @@ -439,7 +437,7 @@ void InlineContext::Dump(unsigned indent)
// Recurse to first child
if (m_Child != nullptr)
{
m_Child->Dump(indent + 2);
m_Child->Dump(verbose, indent + 2);
}
}

Expand Down Expand Up @@ -1367,13 +1365,13 @@ InlineContext* InlineStrategy::NewFailure(Statement* stmt, InlineResult* inlineR
// Dump: dump description of inline behavior
//
// Arguments:
// showBudget - also dump final budget values
// verbose - print more details such as final budget values and IL offsets

void InlineStrategy::Dump(bool showBudget)
void InlineStrategy::Dump(bool verbose)
{
m_RootContext->Dump();
m_RootContext->Dump(verbose, 0);

if (!showBudget)
if (!verbose)
{
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class InlineContext
#if defined(DEBUG) || defined(INLINE_DATA)

// Dump the full subtree, including failures
void Dump(unsigned indent = 0);
void Dump(bool verbose, unsigned indent = 0);

// Dump only the success subtree, with rich data
void DumpData(unsigned indent = 0);
Expand Down Expand Up @@ -923,7 +923,7 @@ class InlineStrategy
#if defined(DEBUG) || defined(INLINE_DATA)

// Dump textual description of inlines done so far.
void Dump(bool showBudget);
void Dump(bool verbose);

// Dump data-format description of inlines done so far.
void DumpData();
Expand Down