From 17ace8339dd8235f3811e3975d9ccc77910b0c77 Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Wed, 16 Dec 2020 04:36:43 +0000 Subject: [PATCH] 8258074: Move some flags related to compiler to compiler_globals.hpp Reviewed-by: kvn, coleenp --- src/hotspot/share/ci/bcEscapeAnalyzer.cpp | 1 + src/hotspot/share/ci/ciMethodData.cpp | 3 +- src/hotspot/share/ci/ciObjectFactory.cpp | 1 + .../share/compiler/compiler_globals.hpp | 410 ++++++++++++++++++ .../share/interpreter/invocationCounter.cpp | 1 + src/hotspot/share/oops/methodCounters.cpp | 44 +- src/hotspot/share/oops/methodCounters.hpp | 41 +- src/hotspot/share/prims/jni.cpp | 1 + src/hotspot/share/runtime/flags/allFlags.hpp | 16 +- src/hotspot/share/runtime/flags/jvmFlag.cpp | 16 +- src/hotspot/share/runtime/globals.hpp | 386 ----------------- test/hotspot/gtest/runtime/test_globals.cpp | 1 + 12 files changed, 481 insertions(+), 440 deletions(-) diff --git a/src/hotspot/share/ci/bcEscapeAnalyzer.cpp b/src/hotspot/share/ci/bcEscapeAnalyzer.cpp index 82eca0d9667d1..02b8d87078f22 100644 --- a/src/hotspot/share/ci/bcEscapeAnalyzer.cpp +++ b/src/hotspot/share/ci/bcEscapeAnalyzer.cpp @@ -29,6 +29,7 @@ #include "ci/ciField.hpp" #include "ci/ciMethodBlocks.hpp" #include "ci/ciStreams.hpp" +#include "compiler/compiler_globals.hpp" #include "interpreter/bytecode.hpp" #include "oops/oop.inline.hpp" #include "utilities/align.hpp" diff --git a/src/hotspot/share/ci/ciMethodData.cpp b/src/hotspot/share/ci/ciMethodData.cpp index fef6e6f166d6f..03e10b73485d0 100644 --- a/src/hotspot/share/ci/ciMethodData.cpp +++ b/src/hotspot/share/ci/ciMethodData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ #include "ci/ciMethodData.hpp" #include "ci/ciReplay.hpp" #include "ci/ciUtilities.inline.hpp" +#include "compiler/compiler_globals.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "runtime/deoptimization.hpp" diff --git a/src/hotspot/share/ci/ciObjectFactory.cpp b/src/hotspot/share/ci/ciObjectFactory.cpp index 0f50c58ff6deb..6ce6a3b8639ca 100644 --- a/src/hotspot/share/ci/ciObjectFactory.cpp +++ b/src/hotspot/share/ci/ciObjectFactory.cpp @@ -44,6 +44,7 @@ #include "ci/ciUtilities.inline.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/systemDictionary.hpp" +#include "compiler/compiler_globals.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "memory/allocation.inline.hpp" #include "memory/universe.hpp" diff --git a/src/hotspot/share/compiler/compiler_globals.hpp b/src/hotspot/share/compiler/compiler_globals.hpp index 8867a328ce115..9cb81a44bd4e6 100644 --- a/src/hotspot/share/compiler/compiler_globals.hpp +++ b/src/hotspot/share/compiler/compiler_globals.hpp @@ -36,4 +36,414 @@ #include "jvmci/jvmci_globals.hpp" #endif +// TODO -- currently, even if all JIT compilers are disabled, the following flags +// are still available in HotSpot. This should eventually be fixed ... + +#define COMPILER_FLAGS(develop, \ + develop_pd, \ + product, \ + product_pd, \ + notproduct, \ + range, \ + constraint) \ + \ + /* compiler interface */ \ + \ + develop(bool, CIPrintCompilerName, false, \ + "when CIPrint is active, print the name of the active compiler") \ + \ + product(bool, CIPrintCompileQueue, false, DIAGNOSTIC, \ + "display the contents of the compile queue whenever a " \ + "compilation is enqueued") \ + \ + develop(bool, CIPrintRequests, false, \ + "display every request for compilation") \ + \ + product(bool, CITime, false, \ + "collect timing information for compilation") \ + \ + develop(bool, CITimeVerbose, false, \ + "be more verbose in compilation timings") \ + \ + develop(bool, CITimeEach, false, \ + "display timing information after each successful compilation") \ + \ + develop(bool, CICountOSR, false, \ + "use a separate counter when assigning ids to osr compilations") \ + \ + develop(bool, CICompileNatives, true, \ + "compile native methods if supported by the compiler") \ + \ + develop_pd(bool, CICompileOSR, \ + "compile on stack replacement methods if supported by the " \ + "compiler") \ + \ + develop(bool, CIPrintMethodCodes, false, \ + "print method bytecodes of the compiled code") \ + \ + develop(bool, CIPrintTypeFlow, false, \ + "print the results of ciTypeFlow analysis") \ + \ + develop(bool, CITraceTypeFlow, false, \ + "detailed per-bytecode tracing of ciTypeFlow analysis") \ + \ + product(bool, CICompilerCountPerCPU, false, \ + "1 compiler thread for log(N CPUs)") \ + \ + notproduct(intx, CICrashAt, -1, \ + "id of compilation to trigger assert in compiler thread for " \ + "the purpose of testing, e.g. generation of replay data") \ + \ + notproduct(bool, CIObjectFactoryVerify, false, \ + "enable potentially expensive verification in ciObjectFactory") \ + \ + develop(intx, CIStart, 0, \ + "The id of the first compilation to permit") \ + \ + develop(intx, CIStop, max_jint, \ + "The id of the last compilation to permit") \ + \ + develop(intx, CIStartOSR, 0, \ + "The id of the first osr compilation to permit " \ + "(CICountOSR must be on)") \ + \ + develop(intx, CIStopOSR, max_jint, \ + "The id of the last osr compilation to permit " \ + "(CICountOSR must be on)") \ + \ + develop(intx, CIBreakAtOSR, -1, \ + "The id of osr compilation to break at") \ + \ + develop(intx, CIBreakAt, -1, \ + "The id of compilation to break at") \ + \ + /* recompilation */ \ + \ + product(double, CompileThresholdScaling, 1.0, \ + "Factor to control when first compilation happens " \ + "(both with and without tiered compilation): " \ + "values greater than 1.0 delay counter overflow, " \ + "values between 0 and 1.0 rush counter overflow, " \ + "value of 1.0 leaves compilation thresholds unchanged " \ + "value of 0.0 is equivalent to -Xint. " \ + "" \ + "Flag can be set as per-method option. " \ + "If a value is specified for a method, compilation thresholds " \ + "for that method are scaled by both the value of the global flag "\ + "and the value of the per-method flag.") \ + range(0.0, DBL_MAX) \ + \ + product(intx, Tier0InvokeNotifyFreqLog, 7, \ + "Interpreter (tier 0) invocation notification frequency") \ + range(0, 30) \ + \ + product(intx, Tier2InvokeNotifyFreqLog, 11, \ + "C1 without MDO (tier 2) invocation notification frequency") \ + range(0, 30) \ + \ + product(intx, Tier3InvokeNotifyFreqLog, 10, \ + "C1 with MDO profiling (tier 3) invocation notification " \ + "frequency") \ + range(0, 30) \ + \ + product(intx, Tier23InlineeNotifyFreqLog, 20, \ + "Inlinee invocation (tiers 2 and 3) notification frequency") \ + range(0, 30) \ + \ + product(intx, Tier0BackedgeNotifyFreqLog, 10, \ + "Interpreter (tier 0) invocation notification frequency") \ + range(0, 30) \ + \ + product(intx, Tier2BackedgeNotifyFreqLog, 14, \ + "C1 without MDO (tier 2) invocation notification frequency") \ + range(0, 30) \ + \ + product(intx, Tier3BackedgeNotifyFreqLog, 13, \ + "C1 with MDO profiling (tier 3) invocation notification " \ + "frequency") \ + range(0, 30) \ + \ + product(intx, Tier2CompileThreshold, 0, \ + "threshold at which tier 2 compilation is invoked") \ + range(0, max_jint) \ + \ + product(intx, Tier2BackEdgeThreshold, 0, \ + "Back edge threshold at which tier 2 compilation is invoked") \ + range(0, max_jint) \ + \ + product(intx, Tier3InvocationThreshold, 200, \ + "Compile if number of method invocations crosses this " \ + "threshold") \ + range(0, max_jint) \ + \ + product(intx, Tier3MinInvocationThreshold, 100, \ + "Minimum invocation to compile at tier 3") \ + range(0, max_jint) \ + \ + product(intx, Tier3CompileThreshold, 2000, \ + "Threshold at which tier 3 compilation is invoked (invocation " \ + "minimum must be satisfied)") \ + range(0, max_jint) \ + \ + product(intx, Tier3BackEdgeThreshold, 60000, \ + "Back edge threshold at which tier 3 OSR compilation is invoked") \ + range(0, max_jint) \ + \ + product(intx, Tier3AOTInvocationThreshold, 10000, \ + "Compile if number of method invocations crosses this " \ + "threshold if coming from AOT") \ + range(0, max_jint) \ + \ + product(intx, Tier3AOTMinInvocationThreshold, 1000, \ + "Minimum invocation to compile at tier 3 if coming from AOT") \ + range(0, max_jint) \ + \ + product(intx, Tier3AOTCompileThreshold, 15000, \ + "Threshold at which tier 3 compilation is invoked (invocation " \ + "minimum must be satisfied) if coming from AOT") \ + range(0, max_jint) \ + \ + product(intx, Tier3AOTBackEdgeThreshold, 120000, \ + "Back edge threshold at which tier 3 OSR compilation is invoked " \ + "if coming from AOT") \ + range(0, max_jint) \ + \ + product(intx, Tier0AOTInvocationThreshold, 200, DIAGNOSTIC, \ + "Switch to interpreter to profile if the number of method " \ + "invocations crosses this threshold if coming from AOT " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier0AOTMinInvocationThreshold, 100, DIAGNOSTIC, \ + "Minimum number of invocations to switch to interpreter " \ + "to profile if coming from AOT " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier0AOTCompileThreshold, 2000, DIAGNOSTIC, \ + "Threshold at which to switch to interpreter to profile " \ + "if coming from AOT " \ + "(invocation minimum must be satisfied, " \ + "applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier0AOTBackEdgeThreshold, 60000, DIAGNOSTIC, \ + "Back edge threshold at which to switch to interpreter " \ + "to profile if coming from AOT " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier4InvocationThreshold, 5000, \ + "Compile if number of method invocations crosses this " \ + "threshold") \ + range(0, max_jint) \ + \ + product(intx, Tier4MinInvocationThreshold, 600, \ + "Minimum invocation to compile at tier 4") \ + range(0, max_jint) \ + \ + product(intx, Tier4CompileThreshold, 15000, \ + "Threshold at which tier 4 compilation is invoked (invocation " \ + "minimum must be satisfied)") \ + range(0, max_jint) \ + \ + product(intx, Tier4BackEdgeThreshold, 40000, \ + "Back edge threshold at which tier 4 OSR compilation is invoked") \ + range(0, max_jint) \ + \ + product(intx, Tier40InvocationThreshold, 5000, DIAGNOSTIC, \ + "Compile if number of method invocations crosses this " \ + "threshold (applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier40MinInvocationThreshold, 600, DIAGNOSTIC, \ + "Minimum number of invocations to compile at tier 4 " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier40CompileThreshold, 10000, DIAGNOSTIC, \ + "Threshold at which tier 4 compilation is invoked (invocation " \ + "minimum must be satisfied, applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier40BackEdgeThreshold, 15000, DIAGNOSTIC, \ + "Back edge threshold at which tier 4 OSR compilation is invoked " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier0Delay, 5, DIAGNOSTIC, \ + "If C2 queue size grows over this amount per compiler thread " \ + "do not start profiling in the interpreter " \ + "(applicable only with " \ + "CompilationMode=high-only|high-only-quick-internal)") \ + range(0, max_jint) \ + \ + product(intx, Tier3DelayOn, 5, \ + "If C2 queue size grows over this amount per compiler thread " \ + "stop compiling at tier 3 and start compiling at tier 2") \ + range(0, max_jint) \ + \ + product(intx, Tier3DelayOff, 2, \ + "If C2 queue size is less than this amount per compiler thread " \ + "allow methods compiled at tier 2 transition to tier 3") \ + range(0, max_jint) \ + \ + product(intx, Tier3LoadFeedback, 5, \ + "Tier 3 thresholds will increase twofold when C1 queue size " \ + "reaches this amount per compiler thread") \ + range(0, max_jint) \ + \ + product(intx, Tier4LoadFeedback, 3, \ + "Tier 4 thresholds will increase twofold when C2 queue size " \ + "reaches this amount per compiler thread") \ + range(0, max_jint) \ + \ + product(intx, TieredCompileTaskTimeout, 50, \ + "Kill compile task if method was not used within " \ + "given timeout in milliseconds") \ + range(0, max_intx) \ + \ + product(intx, TieredStopAtLevel, 4, \ + "Stop at given compilation level") \ + range(0, 4) \ + \ + product(intx, Tier0ProfilingStartPercentage, 200, \ + "Start profiling in interpreter if the counters exceed tier 3 " \ + "thresholds (tier 4 thresholds with " \ + "CompilationMode=high-only|high-only-quick-internal)" \ + "by the specified percentage") \ + range(0, max_jint) \ + \ + product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \ + "Increase the compile threshold for C1 compilation if the code " \ + "cache is filled by the specified percentage") \ + range(0, 99) \ + \ + product(intx, TieredRateUpdateMinTime, 1, \ + "Minimum rate sampling interval (in milliseconds)") \ + range(0, max_intx) \ + \ + product(intx, TieredRateUpdateMaxTime, 25, \ + "Maximum rate sampling interval (in milliseconds)") \ + range(0, max_intx) \ + \ + product(ccstr, CompilationMode, "default", \ + "Compilation modes: " \ + "default: normal tiered compilation; " \ + "quick-only: C1-only mode; " \ + "high-only: C2/JVMCI-only mode; " \ + "high-only-quick-internal: C2/JVMCI-only mode, " \ + "with JVMCI compiler compiled with C1.") \ + \ + product(bool, PrintTieredEvents, false, \ + "Print tiered events notifications") \ + \ + product_pd(intx, OnStackReplacePercentage, \ + "NON_TIERED number of method invocations/branches (expressed as " \ + "% of CompileThreshold) before (re-)compiling OSR code") \ + constraint(OnStackReplacePercentageConstraintFunc, AfterErgo) \ + \ + product(intx, InterpreterProfilePercentage, 33, \ + "NON_TIERED number of method invocations/branches (expressed as " \ + "% of CompileThreshold) before profiling in the interpreter") \ + range(0, 100) \ + \ + /* compiler directives */ \ + \ + product(ccstrlist, CompileOnly, "", \ + "List of methods (pkg/class.name) to restrict compilation to") \ + \ + product(ccstr, CompileCommandFile, NULL, \ + "Read compiler commands from this file [.hotspot_compiler]") \ + \ + product(ccstr, CompilerDirectivesFile, NULL, DIAGNOSTIC, \ + "Read compiler directives from this file") \ + \ + product(ccstrlist, CompileCommand, "", \ + "Prepend to .hotspot_compiler; e.g. log,java/lang/String.") \ + \ + develop(bool, ReplayCompiles, false, \ + "Enable replay of compilations from ReplayDataFile") \ + \ + product(ccstr, ReplayDataFile, NULL, \ + "File containing compilation replay information" \ + "[default: ./replay_pid%p.log] (%p replaced with pid)") \ + \ + product(ccstr, InlineDataFile, NULL, \ + "File containing inlining replay information" \ + "[default: ./inline_pid%p.log] (%p replaced with pid)") \ + \ + develop(intx, ReplaySuppressInitializers, 2, \ + "Control handling of class initialization during replay: " \ + "0 - don't do anything special; " \ + "1 - treat all class initializers as empty; " \ + "2 - treat class initializers for application classes as empty; " \ + "3 - allow all class initializers to run during bootstrap but " \ + " pretend they are empty after starting replay") \ + range(0, 3) \ + \ + develop(bool, ReplayIgnoreInitErrors, false, \ + "Ignore exceptions thrown during initialization for replay") \ + \ + product(bool, DumpReplayDataOnError, true, \ + "Record replay data for crashing compiler threads") \ + \ + product(bool, CompilerDirectivesIgnoreCompileCommands, false, DIAGNOSTIC, \ + "Disable backwards compatibility for compile commands.") \ + \ + product(bool, CompilerDirectivesPrint, false, DIAGNOSTIC, \ + "Print compiler directives on installation.") \ + \ + product(int, CompilerDirectivesLimit, 50, DIAGNOSTIC, \ + "Limit on number of compiler directives.") \ + \ + /* Bytecode escape analysis estimation. */ \ + \ + product(bool, EstimateArgEscape, true, \ + "Analyze bytecodes to estimate escape state of arguments") \ + \ + product(intx, BCEATraceLevel, 0, \ + "How much tracing to do of bytecode escape analysis estimates " \ + "(0-3)") \ + range(0, 3) \ + \ + product(intx, MaxBCEAEstimateLevel, 5, \ + "Maximum number of nested calls that are analyzed by BC EA") \ + range(0, max_jint) \ + \ + product(intx, MaxBCEAEstimateSize, 150, \ + "Maximum bytecode size of a method to be analyzed by BC EA") \ + range(0, max_jint) \ + \ + /* misc compiler flags */ \ + \ + product(bool, AbortVMOnCompilationFailure, false, DIAGNOSTIC, \ + "Abort VM when method had failed to compile.") \ + \ + develop(intx, OSROnlyBCI, -1, \ + "OSR only at this bci. Negative values mean exclude that bci") \ + \ + develop(intx, DesiredMethodLimit, 8000, \ + "The desired maximum method size (in bytecodes) after inlining") \ + \ + product(bool, DontCompileHugeMethods, true, \ + "Do not compile methods > HugeMethodLimit") \ + \ + develop(intx, HugeMethodLimit, 8000, \ + "Don't compile methods larger than this if " \ + "+DontCompileHugeMethods") \ + \ + +// end of COMPILER_FLAGS + +DECLARE_FLAGS(COMPILER_FLAGS) + #endif // SHARE_COMPILER_COMPILER_GLOBALS_HPP diff --git a/src/hotspot/share/interpreter/invocationCounter.cpp b/src/hotspot/share/interpreter/invocationCounter.cpp index 7a45b0a654dff..764c82fc59a10 100644 --- a/src/hotspot/share/interpreter/invocationCounter.cpp +++ b/src/hotspot/share/interpreter/invocationCounter.cpp @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "compiler/compiler_globals.hpp" #include "interpreter/invocationCounter.hpp" void InvocationCounter::init() { diff --git a/src/hotspot/share/oops/methodCounters.cpp b/src/hotspot/share/oops/methodCounters.cpp index 104743e91a175..334a1eb5289a1 100644 --- a/src/hotspot/share/oops/methodCounters.cpp +++ b/src/hotspot/share/oops/methodCounters.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,10 +22,52 @@ * */ #include "precompiled.hpp" +#include "compiler/compiler_globals.hpp" #include "memory/metaspaceClosure.hpp" #include "oops/methodCounters.hpp" #include "runtime/handles.inline.hpp" +MethodCounters::MethodCounters(const methodHandle& mh) : +#if INCLUDE_AOT + _method(mh()), +#endif + _nmethod_age(INT_MAX) +#ifdef TIERED + , _rate(0), + _prev_time(0), + _highest_comp_level(0), + _highest_osr_comp_level(0) +#endif +{ + set_interpreter_invocation_count(0); + set_interpreter_throwout_count(0); + JVMTI_ONLY(clear_number_of_breakpoints()); + invocation_counter()->init(); + backedge_counter()->init(); + + if (StressCodeAging) { + set_nmethod_age(HotMethodDetectionLimit); + } + + // Set per-method thresholds. + double scale = 1.0; + CompilerOracle::has_option_value(mh, CompileCommand::CompileThresholdScaling, scale); + + int compile_threshold = CompilerConfig::scaled_compile_threshold(CompileThreshold, scale); + _interpreter_invocation_limit = compile_threshold << InvocationCounter::count_shift; + if (ProfileInterpreter) { + // If interpreter profiling is enabled, the backward branch limit + // is compared against the method data counter rather than an invocation + // counter, therefore no shifting of bits is required. + _interpreter_backward_branch_limit = (int)((int64_t)compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100); + } else { + _interpreter_backward_branch_limit = (int)(((int64_t)compile_threshold * OnStackReplacePercentage / 100) << InvocationCounter::count_shift); + } + _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift; + _invoke_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift; + _backedge_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift; +} + MethodCounters* MethodCounters::allocate(const methodHandle& mh, TRAPS) { ClassLoaderData* loader_data = mh->method_holder()->class_loader_data(); return new(loader_data, method_counters_size(), MetaspaceObj::MethodCountersType, THREAD) MethodCounters(mh); diff --git a/src/hotspot/share/oops/methodCounters.hpp b/src/hotspot/share/oops/methodCounters.hpp index 38e2512ef5f52..a231273345991 100644 --- a/src/hotspot/share/oops/methodCounters.hpp +++ b/src/hotspot/share/oops/methodCounters.hpp @@ -70,46 +70,7 @@ class MethodCounters : public Metadata { u1 _highest_osr_comp_level; // Same for OSR level #endif - MethodCounters(const methodHandle& mh) : -#if INCLUDE_AOT - _method(mh()), -#endif - _nmethod_age(INT_MAX) -#ifdef TIERED - , _rate(0), - _prev_time(0), - _highest_comp_level(0), - _highest_osr_comp_level(0) -#endif - { - set_interpreter_invocation_count(0); - set_interpreter_throwout_count(0); - JVMTI_ONLY(clear_number_of_breakpoints()); - invocation_counter()->init(); - backedge_counter()->init(); - - if (StressCodeAging) { - set_nmethod_age(HotMethodDetectionLimit); - } - - // Set per-method thresholds. - double scale = 1.0; - CompilerOracle::has_option_value(mh, CompileCommand::CompileThresholdScaling, scale); - - int compile_threshold = CompilerConfig::scaled_compile_threshold(CompileThreshold, scale); - _interpreter_invocation_limit = compile_threshold << InvocationCounter::count_shift; - if (ProfileInterpreter) { - // If interpreter profiling is enabled, the backward branch limit - // is compared against the method data counter rather than an invocation - // counter, therefore no shifting of bits is required. - _interpreter_backward_branch_limit = (int)((int64_t)compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100); - } else { - _interpreter_backward_branch_limit = (int)(((int64_t)compile_threshold * OnStackReplacePercentage / 100) << InvocationCounter::count_shift); - } - _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift; - _invoke_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift; - _backedge_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0BackedgeNotifyFreqLog, scale)) << InvocationCounter::count_shift; - } + MethodCounters(const methodHandle& mh); public: virtual bool is_methodCounters() const { return true; } diff --git a/src/hotspot/share/prims/jni.cpp b/src/hotspot/share/prims/jni.cpp index b2b02a3668f5f..a87b9446dc153 100644 --- a/src/hotspot/share/prims/jni.cpp +++ b/src/hotspot/share/prims/jni.cpp @@ -38,6 +38,7 @@ #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" +#include "compiler/compiler_globals.hpp" #include "gc/shared/gcLocker.inline.hpp" #include "interpreter/linkResolver.hpp" #include "jfr/jfrEvents.hpp" diff --git a/src/hotspot/share/runtime/flags/allFlags.hpp b/src/hotspot/share/runtime/flags/allFlags.hpp index 68e529e139c7b..cd62753cca664 100644 --- a/src/hotspot/share/runtime/flags/allFlags.hpp +++ b/src/hotspot/share/runtime/flags/allFlags.hpp @@ -28,9 +28,8 @@ #include "compiler/compiler_globals.hpp" #include "runtime/globals.hpp" -// Put the LP64/JVMCI/COMPILER1/COMPILER1/ARCH at -// the top, as they are processed by jvmFlags.cpp in that -// order. +// Put LP64/ARCH/JVMCI/COMPILER1/COMPILER2 at the top, +// as they are processed by jvmFlag.cpp in that order. #define ALL_FLAGS( \ develop, \ @@ -50,6 +49,13 @@ range, \ constraint) \ \ + ARCH_FLAGS( \ + develop, \ + product, \ + notproduct, \ + range, \ + constraint) \ + \ JVMCI_ONLY(JVMCI_FLAGS( \ develop, \ develop_pd, \ @@ -77,9 +83,11 @@ range, \ constraint)) \ \ - ARCH_FLAGS( \ + COMPILER_FLAGS( \ develop, \ + develop_pd, \ product, \ + product_pd, \ notproduct, \ range, \ constraint) \ diff --git a/src/hotspot/share/runtime/flags/jvmFlag.cpp b/src/hotspot/share/runtime/flags/jvmFlag.cpp index 464f4a75f9652..c1a440f237d47 100644 --- a/src/hotspot/share/runtime/flags/jvmFlag.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp @@ -466,7 +466,7 @@ const char* JVMFlag::flag_error_str(JVMFlag::Error error) { //---------------------------------------------------------------------- // Build flagTable[] -// Find out the number of LP64/JVMCI/COMPILER1/COMPILER1/ARCH flags, +// Find out the number of LP64/ARCH/JVMCI/COMPILER1/COMPILER2 flags, // for JVMFlag::flag_group() #define ENUM_F(type, name, ...) enum_##name, @@ -474,24 +474,24 @@ const char* JVMFlag::flag_error_str(JVMFlag::Error error) { // dev dev-pd pro pro-pd notpro range constraint enum FlagCounter_LP64 { LP64_RUNTIME_FLAGS( ENUM_F, ENUM_F, ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F) num_flags_LP64 }; +enum FlagCounter_ARCH { ARCH_FLAGS( ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F) num_flags_ARCH }; enum FlagCounter_JVMCI { JVMCI_ONLY(JVMCI_FLAGS( ENUM_F, ENUM_F, ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F)) num_flags_JVMCI }; enum FlagCounter_C1 { COMPILER1_PRESENT(C1_FLAGS(ENUM_F, ENUM_F, ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F)) num_flags_C1 }; enum FlagCounter_C2 { COMPILER2_PRESENT(C2_FLAGS(ENUM_F, ENUM_F, ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F)) num_flags_C2 }; -enum FlagCounter_ARCH { ARCH_FLAGS( ENUM_F, ENUM_F, ENUM_F, IGNORE_F, IGNORE_F) num_flags_ARCH }; const int first_flag_enum_LP64 = 0; -const int first_flag_enum_JVMCI = first_flag_enum_LP64 + num_flags_LP64; +const int first_flag_enum_ARCH = first_flag_enum_LP64 + num_flags_LP64; +const int first_flag_enum_JVMCI = first_flag_enum_ARCH + num_flags_ARCH; const int first_flag_enum_C1 = first_flag_enum_JVMCI + num_flags_JVMCI; const int first_flag_enum_C2 = first_flag_enum_C1 + num_flags_C1; -const int first_flag_enum_ARCH = first_flag_enum_C2 + num_flags_C2; -const int first_flag_enum_other = first_flag_enum_ARCH + num_flags_ARCH; +const int first_flag_enum_other = first_flag_enum_C2 + num_flags_C2; static constexpr int flag_group(int flag_enum) { - if (flag_enum < first_flag_enum_JVMCI) return JVMFlag::KIND_LP64_PRODUCT; + if (flag_enum < first_flag_enum_ARCH) return JVMFlag::KIND_LP64_PRODUCT; + if (flag_enum < first_flag_enum_JVMCI) return JVMFlag::KIND_ARCH; if (flag_enum < first_flag_enum_C1) return JVMFlag::KIND_JVMCI; if (flag_enum < first_flag_enum_C2) return JVMFlag::KIND_C1; - if (flag_enum < first_flag_enum_ARCH) return JVMFlag::KIND_C2; - if (flag_enum < first_flag_enum_other) return JVMFlag::KIND_ARCH; + if (flag_enum < first_flag_enum_other) return JVMFlag::KIND_C2; return 0; } diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 9c15f291a06de..233a861c6fd74 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -963,49 +963,6 @@ const intx ObjectAlignmentInBytes = 8; product(bool, VerifyBeforeIteration, false, DIAGNOSTIC, \ "Verify memory system before JVMTI iteration") \ \ - /* compiler interface */ \ - \ - develop(bool, CIPrintCompilerName, false, \ - "when CIPrint is active, print the name of the active compiler") \ - \ - product(bool, CIPrintCompileQueue, false, DIAGNOSTIC, \ - "display the contents of the compile queue whenever a " \ - "compilation is enqueued") \ - \ - develop(bool, CIPrintRequests, false, \ - "display every request for compilation") \ - \ - product(bool, CITime, false, \ - "collect timing information for compilation") \ - \ - develop(bool, CITimeVerbose, false, \ - "be more verbose in compilation timings") \ - \ - develop(bool, CITimeEach, false, \ - "display timing information after each successful compilation") \ - \ - develop(bool, CICountOSR, false, \ - "use a separate counter when assigning ids to osr compilations") \ - \ - develop(bool, CICompileNatives, true, \ - "compile native methods if supported by the compiler") \ - \ - develop_pd(bool, CICompileOSR, \ - "compile on stack replacement methods if supported by the " \ - "compiler") \ - \ - develop(bool, CIPrintMethodCodes, false, \ - "print method bytecodes of the compiled code") \ - \ - develop(bool, CIPrintTypeFlow, false, \ - "print the results of ciTypeFlow analysis") \ - \ - develop(bool, CITraceTypeFlow, false, \ - "detailed per-bytecode tracing of ciTypeFlow analysis") \ - \ - develop(intx, OSROnlyBCI, -1, \ - "OSR only at this bci. Negative values mean exclude that bci") \ - \ /* compiler */ \ \ /* notice: the max range value here is max_jint, not max_intx */ \ @@ -1380,26 +1337,6 @@ const intx ObjectAlignmentInBytes = 8; "When using recompilation, never interpret methods " \ "containing loops") \ \ - product(bool, DontCompileHugeMethods, true, \ - "Do not compile methods > HugeMethodLimit") \ - \ - /* Bytecode escape analysis estimation. */ \ - product(bool, EstimateArgEscape, true, \ - "Analyze bytecodes to estimate escape state of arguments") \ - \ - product(intx, BCEATraceLevel, 0, \ - "How much tracing to do of bytecode escape analysis estimates " \ - "(0-3)") \ - range(0, 3) \ - \ - product(intx, MaxBCEAEstimateLevel, 5, \ - "Maximum number of nested calls that are analyzed by BC EA") \ - range(0, max_jint) \ - \ - product(intx, MaxBCEAEstimateSize, 150, \ - "Maximum bytecode size of a method to be analyzed by BC EA") \ - range(0, max_jint) \ - \ product(intx, AllocatePrefetchStyle, 1, \ "0 = no prefetch, " \ "1 = generate prefetch instructions for each allocation, " \ @@ -1775,77 +1712,6 @@ const intx ObjectAlignmentInBytes = 8; develop(intx, TraceBytecodesAt, 0, \ "Trace bytecodes starting with specified bytecode number") \ \ - /* compiler interface */ \ - develop(intx, CIStart, 0, \ - "The id of the first compilation to permit") \ - \ - develop(intx, CIStop, max_jint, \ - "The id of the last compilation to permit") \ - \ - develop(intx, CIStartOSR, 0, \ - "The id of the first osr compilation to permit " \ - "(CICountOSR must be on)") \ - \ - develop(intx, CIStopOSR, max_jint, \ - "The id of the last osr compilation to permit " \ - "(CICountOSR must be on)") \ - \ - develop(intx, CIBreakAtOSR, -1, \ - "The id of osr compilation to break at") \ - \ - develop(intx, CIBreakAt, -1, \ - "The id of compilation to break at") \ - \ - product(ccstrlist, CompileOnly, "", \ - "List of methods (pkg/class.name) to restrict compilation to") \ - \ - product(ccstr, CompileCommandFile, NULL, \ - "Read compiler commands from this file [.hotspot_compiler]") \ - \ - product(ccstr, CompilerDirectivesFile, NULL, DIAGNOSTIC, \ - "Read compiler directives from this file") \ - \ - product(ccstrlist, CompileCommand, "", \ - "Prepend to .hotspot_compiler; e.g. log,java/lang/String.") \ - \ - develop(bool, ReplayCompiles, false, \ - "Enable replay of compilations from ReplayDataFile") \ - \ - product(ccstr, ReplayDataFile, NULL, \ - "File containing compilation replay information" \ - "[default: ./replay_pid%p.log] (%p replaced with pid)") \ - \ - product(ccstr, InlineDataFile, NULL, \ - "File containing inlining replay information" \ - "[default: ./inline_pid%p.log] (%p replaced with pid)") \ - \ - develop(intx, ReplaySuppressInitializers, 2, \ - "Control handling of class initialization during replay: " \ - "0 - don't do anything special; " \ - "1 - treat all class initializers as empty; " \ - "2 - treat class initializers for application classes as empty; " \ - "3 - allow all class initializers to run during bootstrap but " \ - " pretend they are empty after starting replay") \ - range(0, 3) \ - \ - develop(bool, ReplayIgnoreInitErrors, false, \ - "Ignore exceptions thrown during initialization for replay") \ - \ - product(bool, DumpReplayDataOnError, true, \ - "Record replay data for crashing compiler threads") \ - \ - product(bool, CICompilerCountPerCPU, false, \ - "1 compiler thread for log(N CPUs)") \ - \ - notproduct(intx, CICrashAt, -1, \ - "id of compilation to trigger assert in compiler thread for " \ - "the purpose of testing, e.g. generation of replay data") \ - notproduct(bool, CIObjectFactoryVerify, false, \ - "enable potentially expensive verification in ciObjectFactory") \ - \ - product(bool, AbortVMOnCompilationFailure, false, DIAGNOSTIC, \ - "Abort VM when method had failed to compile.") \ - \ /* Priorities */ \ product_pd(bool, UseThreadPriorities, "Use native thread priorities") \ \ @@ -1943,253 +1809,9 @@ const intx ObjectAlignmentInBytes = 8; "number of interpreted method invocations before (re-)compiling") \ constraint(CompileThresholdConstraintFunc, AfterErgo) \ \ - product(double, CompileThresholdScaling, 1.0, \ - "Factor to control when first compilation happens " \ - "(both with and without tiered compilation): " \ - "values greater than 1.0 delay counter overflow, " \ - "values between 0 and 1.0 rush counter overflow, " \ - "value of 1.0 leaves compilation thresholds unchanged " \ - "value of 0.0 is equivalent to -Xint. " \ - "" \ - "Flag can be set as per-method option. " \ - "If a value is specified for a method, compilation thresholds " \ - "for that method are scaled by both the value of the global flag "\ - "and the value of the per-method flag.") \ - range(0.0, DBL_MAX) \ - \ - product(intx, Tier0InvokeNotifyFreqLog, 7, \ - "Interpreter (tier 0) invocation notification frequency") \ - range(0, 30) \ - \ - product(intx, Tier2InvokeNotifyFreqLog, 11, \ - "C1 without MDO (tier 2) invocation notification frequency") \ - range(0, 30) \ - \ - product(intx, Tier3InvokeNotifyFreqLog, 10, \ - "C1 with MDO profiling (tier 3) invocation notification " \ - "frequency") \ - range(0, 30) \ - \ - product(intx, Tier23InlineeNotifyFreqLog, 20, \ - "Inlinee invocation (tiers 2 and 3) notification frequency") \ - range(0, 30) \ - \ - product(intx, Tier0BackedgeNotifyFreqLog, 10, \ - "Interpreter (tier 0) invocation notification frequency") \ - range(0, 30) \ - \ - product(intx, Tier2BackedgeNotifyFreqLog, 14, \ - "C1 without MDO (tier 2) invocation notification frequency") \ - range(0, 30) \ - \ - product(intx, Tier3BackedgeNotifyFreqLog, 13, \ - "C1 with MDO profiling (tier 3) invocation notification " \ - "frequency") \ - range(0, 30) \ - \ - product(intx, Tier2CompileThreshold, 0, \ - "threshold at which tier 2 compilation is invoked") \ - range(0, max_jint) \ - \ - product(intx, Tier2BackEdgeThreshold, 0, \ - "Back edge threshold at which tier 2 compilation is invoked") \ - range(0, max_jint) \ - \ - product(intx, Tier3InvocationThreshold, 200, \ - "Compile if number of method invocations crosses this " \ - "threshold") \ - range(0, max_jint) \ - \ - product(intx, Tier3MinInvocationThreshold, 100, \ - "Minimum invocation to compile at tier 3") \ - range(0, max_jint) \ - \ - product(intx, Tier3CompileThreshold, 2000, \ - "Threshold at which tier 3 compilation is invoked (invocation " \ - "minimum must be satisfied)") \ - range(0, max_jint) \ - \ - product(intx, Tier3BackEdgeThreshold, 60000, \ - "Back edge threshold at which tier 3 OSR compilation is invoked") \ - range(0, max_jint) \ - \ - product(intx, Tier3AOTInvocationThreshold, 10000, \ - "Compile if number of method invocations crosses this " \ - "threshold if coming from AOT") \ - range(0, max_jint) \ - \ - product(intx, Tier3AOTMinInvocationThreshold, 1000, \ - "Minimum invocation to compile at tier 3 if coming from AOT") \ - range(0, max_jint) \ - \ - product(intx, Tier3AOTCompileThreshold, 15000, \ - "Threshold at which tier 3 compilation is invoked (invocation " \ - "minimum must be satisfied) if coming from AOT") \ - range(0, max_jint) \ - \ - product(intx, Tier3AOTBackEdgeThreshold, 120000, \ - "Back edge threshold at which tier 3 OSR compilation is invoked " \ - "if coming from AOT") \ - range(0, max_jint) \ - \ - product(intx, Tier0AOTInvocationThreshold, 200, DIAGNOSTIC, \ - "Switch to interpreter to profile if the number of method " \ - "invocations crosses this threshold if coming from AOT " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier0AOTMinInvocationThreshold, 100, DIAGNOSTIC, \ - "Minimum number of invocations to switch to interpreter " \ - "to profile if coming from AOT " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier0AOTCompileThreshold, 2000, DIAGNOSTIC, \ - "Threshold at which to switch to interpreter to profile " \ - "if coming from AOT " \ - "(invocation minimum must be satisfied, " \ - "applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier0AOTBackEdgeThreshold, 60000, DIAGNOSTIC, \ - "Back edge threshold at which to switch to interpreter " \ - "to profile if coming from AOT " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier4InvocationThreshold, 5000, \ - "Compile if number of method invocations crosses this " \ - "threshold") \ - range(0, max_jint) \ - \ - product(intx, Tier4MinInvocationThreshold, 600, \ - "Minimum invocation to compile at tier 4") \ - range(0, max_jint) \ - \ - product(intx, Tier4CompileThreshold, 15000, \ - "Threshold at which tier 4 compilation is invoked (invocation " \ - "minimum must be satisfied)") \ - range(0, max_jint) \ - \ - product(intx, Tier4BackEdgeThreshold, 40000, \ - "Back edge threshold at which tier 4 OSR compilation is invoked") \ - range(0, max_jint) \ - \ - product(intx, Tier40InvocationThreshold, 5000, DIAGNOSTIC, \ - "Compile if number of method invocations crosses this " \ - "threshold (applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier40MinInvocationThreshold, 600, DIAGNOSTIC, \ - "Minimum number of invocations to compile at tier 4 " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier40CompileThreshold, 10000, DIAGNOSTIC, \ - "Threshold at which tier 4 compilation is invoked (invocation " \ - "minimum must be satisfied, applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier40BackEdgeThreshold, 15000, DIAGNOSTIC, \ - "Back edge threshold at which tier 4 OSR compilation is invoked " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier0Delay, 5, DIAGNOSTIC, \ - "If C2 queue size grows over this amount per compiler thread " \ - "do not start profiling in the interpreter " \ - "(applicable only with " \ - "CompilationMode=high-only|high-only-quick-internal)") \ - range(0, max_jint) \ - \ - product(intx, Tier3DelayOn, 5, \ - "If C2 queue size grows over this amount per compiler thread " \ - "stop compiling at tier 3 and start compiling at tier 2") \ - range(0, max_jint) \ - \ - product(intx, Tier3DelayOff, 2, \ - "If C2 queue size is less than this amount per compiler thread " \ - "allow methods compiled at tier 2 transition to tier 3") \ - range(0, max_jint) \ - \ - product(intx, Tier3LoadFeedback, 5, \ - "Tier 3 thresholds will increase twofold when C1 queue size " \ - "reaches this amount per compiler thread") \ - range(0, max_jint) \ - \ - product(intx, Tier4LoadFeedback, 3, \ - "Tier 4 thresholds will increase twofold when C2 queue size " \ - "reaches this amount per compiler thread") \ - range(0, max_jint) \ - \ - product(intx, TieredCompileTaskTimeout, 50, \ - "Kill compile task if method was not used within " \ - "given timeout in milliseconds") \ - range(0, max_intx) \ - \ - product(intx, TieredStopAtLevel, 4, \ - "Stop at given compilation level") \ - range(0, 4) \ - \ - product(intx, Tier0ProfilingStartPercentage, 200, \ - "Start profiling in interpreter if the counters exceed tier 3 " \ - "thresholds (tier 4 thresholds with " \ - "CompilationMode=high-only|high-only-quick-internal)" \ - "by the specified percentage") \ - range(0, max_jint) \ - \ - product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \ - "Increase the compile threshold for C1 compilation if the code " \ - "cache is filled by the specified percentage") \ - range(0, 99) \ - \ - product(intx, TieredRateUpdateMinTime, 1, \ - "Minimum rate sampling interval (in milliseconds)") \ - range(0, max_intx) \ - \ - product(intx, TieredRateUpdateMaxTime, 25, \ - "Maximum rate sampling interval (in milliseconds)") \ - range(0, max_intx) \ - \ - product(ccstr, CompilationMode, "default", \ - "Compilation modes: " \ - "default: normal tiered compilation; " \ - "quick-only: C1-only mode; " \ - "high-only: C2/JVMCI-only mode; " \ - "high-only-quick-internal: C2/JVMCI-only mode, " \ - "with JVMCI compiler compiled with C1.") \ - \ product_pd(bool, TieredCompilation, \ "Enable tiered compilation") \ \ - product(bool, PrintTieredEvents, false, \ - "Print tiered events notifications") \ - \ - product_pd(intx, OnStackReplacePercentage, \ - "NON_TIERED number of method invocations/branches (expressed as " \ - "% of CompileThreshold) before (re-)compiling OSR code") \ - constraint(OnStackReplacePercentageConstraintFunc, AfterErgo) \ - \ - product(intx, InterpreterProfilePercentage, 33, \ - "NON_TIERED number of method invocations/branches (expressed as " \ - "% of CompileThreshold) before profiling in the interpreter") \ - range(0, 100) \ - \ - develop(intx, DesiredMethodLimit, 8000, \ - "The desired maximum method size (in bytecodes) after inlining") \ - \ - develop(intx, HugeMethodLimit, 8000, \ - "Don't compile methods larger than this if " \ - "+DontCompileHugeMethods") \ - \ /* Properties for Java libraries */ \ \ product(uint64_t, MaxDirectMemorySize, 0, \ @@ -2451,14 +2073,6 @@ const intx ObjectAlignmentInBytes = 8; range(0, max_intx) \ constraint(InitArrayShortSizeConstraintFunc, AfterErgo) \ \ - product(bool, CompilerDirectivesIgnoreCompileCommands, false, DIAGNOSTIC, \ - "Disable backwards compatibility for compile commands.") \ - \ - product(bool, CompilerDirectivesPrint, false, DIAGNOSTIC, \ - "Print compiler directives on installation.") \ - product(int, CompilerDirectivesLimit, 50, DIAGNOSTIC, \ - "Limit on number of compiler directives.") \ - \ product(ccstr, AllocateHeapAt, NULL, \ "Path to the directoy where a temporary file will be created " \ "to use as the backing store for Java Heap.") \ diff --git a/test/hotspot/gtest/runtime/test_globals.cpp b/test/hotspot/gtest/runtime/test_globals.cpp index 22233d5990d2b..bf44a6ce653e0 100644 --- a/test/hotspot/gtest/runtime/test_globals.cpp +++ b/test/hotspot/gtest/runtime/test_globals.cpp @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "compiler/compiler_globals.hpp" #include "runtime/globals.hpp" #include "runtime/flags/flagSetting.hpp" #include "runtime/flags/jvmFlag.hpp"