From ff467045bc24fcf890ca6f1b58c647cc44b013bd Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Wed, 17 Oct 2018 16:28:29 -0700 Subject: Print Tier-0 or Tier-1 to JIT dump output (#20453) * 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 | 9 +++++++++ src/jit/compiler.cpp | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index 2a9b5e3719..4d908dafc4 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -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"); diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index c9b7bb95f8..e11d11f58b 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -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" -- cgit v1.2.3