Inliner: enable minimal xml mode
authorAndy Ayers <andya@microsoft.com>
Wed, 25 May 2016 18:14:02 +0000 (11:14 -0700)
committerAndy Ayers <andya@microsoft.com>
Thu, 26 May 2016 01:21:37 +0000 (18:21 -0700)
Allow production of minimal inline xml, which only contains entries
for methods with inlines. Enabled if `JitInlineDumpXml = 2`.

Since the default for inline replay is noinline, replaying minimal
versus full xml should give the same result.

Commit migrated from https://github.com/dotnet/coreclr/commit/a48a63f48edc033be423c3dc1de983017954d87d

src/coreclr/src/jit/inline.cpp
src/coreclr/src/jit/jitconfigvalues.h

index d77e2e2..146ef05 100644 (file)
@@ -1416,6 +1416,14 @@ void InlineStrategy::DumpXml(FILE* file, unsigned indent)
         s_HasDumpedXmlHeader = true;
     }
 
+    // If we're dumping "minimal" Xml, and we didn't do
+    // any inlines into this method, then there's nothing
+    // to emit here.
+    if ((m_InlineCount == 0) && (JitConfig.JitInlineDumpXml() == 2))
+    {
+        return;
+    }
+
     // Cache references to compiler substructures.
     const Compiler::Info& info = m_Compiler->info;
     const Compiler::Options& opts = m_Compiler->opts;
index 684db06..c156684 100644 (file)
@@ -192,7 +192,7 @@ CONFIG_STRING(TailCallOpt, W("TailCallOpt"))
 
 #if defined(DEBUG) || defined(INLINE_DATA)
 CONFIG_INTEGER(JitInlineDumpData, W("JitInlineDumpData"), 0)
-CONFIG_INTEGER(JitInlineDumpXml, W("JitInlineDumpXml"), 0)
+CONFIG_INTEGER(JitInlineDumpXml, W("JitInlineDumpXml"), 0)   // 1 = full xml (all methods), 2 = minimal xml (only method with inlines)
 CONFIG_INTEGER(JitInlineLimit, W("JitInlineLimit"), -1)
 CONFIG_INTEGER(JitInlinePolicyDiscretionary, W("JitInlinePolicyDiscretionary"), 0)
 CONFIG_INTEGER(JitInlinePolicyModel, W("JitInlinePolicyModel"), 0)