Print Tier-0 or Tier-1 to JIT dump output (#20453)
authorBruce Forstall <brucefo@microsoft.com>
Wed, 17 Oct 2018 23:28:29 +0000 (16:28 -0700)
committerGitHub <noreply@github.com>
Wed, 17 Oct 2018 23:28:29 +0000 (16:28 -0700)
* Print Tier-0 or Tier-1 to JIT dump output

Make it very obvious we've been asked to generate Tier-0 code.

* Print Tier-0 or Tier-1 in assembly output, as appropriate

src/jit/codegencommon.cpp
src/jit/compiler.cpp

index 2a9b5e37199f465df12ddc9481b2bcc0d9ed6253..4d908dafc4aa4ba6ffc2e81d1347bd9db68460fa 100644 (file)
@@ -2276,6 +2276,15 @@ void CodeGen::genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode)
 
         printf("\n");
 
+        if (compiler->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0))
+        {
+            printf("; Tier-0 compilation\n");
+        }
+        if (compiler->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1))
+        {
+            printf("; Tier-1 compilation\n");
+        }
+
         if ((compiler->opts.compFlags & CLFLG_MAXOPT) == CLFLG_MAXOPT)
         {
             printf("; optimized code\n");
index c9b7bb95f81734a61cc4097302fed97b2693e9c3..e11d11f58b841624768bd5d643569acdf20dfa6e 100644 (file)
@@ -3661,6 +3661,18 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
 
     if (verbose)
     {
+        // If we are compiling for a specific tier, make that very obvious in the output.
+        // Note that we don't expect multiple TIER flags to be set at one time, but there
+        // is nothing preventing that.
+        if (jitFlags->IsSet(JitFlags::JIT_FLAG_TIER0))
+        {
+            printf("OPTIONS: Tier-0 compilation (set COMPlus_TieredCompilation=0 to disable)\n");
+        }
+        if (jitFlags->IsSet(JitFlags::JIT_FLAG_TIER1))
+        {
+            printf("OPTIONS: Tier-1 compilation\n");
+        }
+
         printf("OPTIONS: compCodeOpt = %s\n",
                (opts.compCodeOpt == BLENDED_CODE)
                    ? "BLENDED_CODE"