src/hotspot/share/compiler/compilerDefinitions.hpp
author coleenp
Wed, 13 Nov 2019 08:23:23 -0500
changeset 59056 15936b142f86
parent 58926 ecb801342b8c
permissions -rw-r--r--
8233913: Remove implicit conversion from Method* to methodHandle Summary: Fix call sites to use existing THREAD local or pass down THREAD local for shallower callsites. Make linkResolver methods return Method* for caller to handleize if needed. Reviewed-by: iklam, thartmann, hseigel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50729
diff changeset
     2
 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     4
 *
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     7
 * published by the Free Software Foundation.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     8
 *
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    13
 * accompanied this code).
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    14
 *
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    18
 *
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    21
 * questions.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    22
 *
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    23
 */
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50729
diff changeset
    25
#ifndef SHARE_COMPILER_COMPILERDEFINITIONS_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50729
diff changeset
    26
#define SHARE_COMPILER_COMPILERDEFINITIONS_HPP
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    27
50589
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
    28
#include "memory/allocation.hpp"
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    29
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    30
// The (closed set) of concrete compiler classes.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    31
enum CompilerType {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    32
  compiler_none,
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    33
  compiler_c1,
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    34
  compiler_c2,
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    35
  compiler_jvmci,
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    36
  compiler_number_of_types
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    37
};
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    38
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    39
extern const char* compilertype2name_tab[compiler_number_of_types];     // Map CompilerType to its name
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    40
inline const char* compilertype2name(CompilerType t) { return (uint)t < compiler_number_of_types ? compilertype2name_tab[t] : NULL; }
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    41
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    42
// Handy constants for deciding which compiler mode to use.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    43
enum MethodCompilation {
50729
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    44
  InvocationEntryBci   = -1,     // i.e., not a on-stack replacement compilation
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    45
  BeforeBci            = InvocationEntryBci,
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    46
  AfterBci             = -2,
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    47
  UnwindBci            = -3,
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    48
  AfterExceptionBci    = -4,
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    49
  UnknownBci           = -5,
7755c93d3923 8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents: 50589
diff changeset
    50
  InvalidFrameStateBci = -6
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    51
};
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    52
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    53
// Enumeration to distinguish tiers of compilation
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    54
enum CompLevel {
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 42040
diff changeset
    55
  CompLevel_any               = -2,
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 42040
diff changeset
    56
  CompLevel_all               = -2,
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 42040
diff changeset
    57
  CompLevel_aot               = -1,
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    58
  CompLevel_none              = 0,         // Interpreter
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    59
  CompLevel_simple            = 1,         // C1
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    60
  CompLevel_limited_profile   = 2,         // C1, invocation & backedge counters
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    61
  CompLevel_full_profile      = 3,         // C1, invocation & backedge counters + mdo
47687
fb290fd1f9d4 8171853: Remove Shark compiler
rkennke
parents: 47216
diff changeset
    62
  CompLevel_full_optimization = 4          // C2 or JVMCI
43455
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    63
};
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    64
58926
ecb801342b8c 8233429: Minimal and zero VM build broken after JDK-8227003
jiefu
parents: 58894
diff changeset
    65
#ifdef TIERED
58894
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    66
class CompilationModeFlag : AllStatic {
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    67
  static bool _quick_only;
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    68
  static bool _high_only;
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    69
  static bool _high_only_quick_internal;
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    70
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    71
public:
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    72
  static bool initialize();
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    73
  static bool normal()                   { return !quick_only() && !high_only() && !high_only_quick_internal(); }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    74
  static bool quick_only()               { return _quick_only;               }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    75
  static bool high_only()                { return _high_only;                }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    76
  static bool high_only_quick_internal() { return _high_only_quick_internal; }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    77
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    78
  static bool disable_intermediate()     { return high_only() || high_only_quick_internal(); }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    79
  static bool quick_internal()           { return !high_only(); }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    80
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    81
  static void set_high_only_quick_internal(bool x) { _high_only_quick_internal = x; }
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    82
};
58926
ecb801342b8c 8233429: Minimal and zero VM build broken after JDK-8227003
jiefu
parents: 58894
diff changeset
    83
#endif
58894
b95bead30957 8227003: Add high-level JIT compilation mode control mechanism
iveresov
parents: 53244
diff changeset
    84
43455
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    85
extern CompLevel CompLevel_highest_tier;
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    86
extern CompLevel CompLevel_initial_compile;
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    87
43455
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    88
enum CompMode {
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    89
  CompMode_none = 0,
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    90
  CompMode_client = 1,
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    91
  CompMode_server = 2
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    92
};
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
    93
43455
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    94
extern CompMode Compilation_mode;
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    95
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    96
inline bool is_server_compilation_mode_vm() {
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    97
  return Compilation_mode == CompMode_server;
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    98
}
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
    99
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
   100
inline bool is_client_compilation_mode_vm() {
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
   101
  return Compilation_mode == CompMode_client;
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
   102
}
96560cffef4d 8166002: Emulate client build on platforms with reduced virtual address space
jcm
parents: 42650
diff changeset
   103
42040
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   104
inline bool is_c1_compile(int comp_level) {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   105
  return comp_level > CompLevel_none && comp_level < CompLevel_full_optimization;
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   106
}
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   107
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   108
inline bool is_c2_compile(int comp_level) {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   109
  return comp_level == CompLevel_full_optimization;
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   110
}
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   111
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   112
inline bool is_highest_tier_compile(int comp_level) {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   113
  return comp_level == CompLevel_highest_tier;
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   114
}
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   115
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   116
inline bool is_compile(int comp_level) {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   117
  return is_c1_compile(comp_level) || is_c2_compile(comp_level);
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   118
}
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   119
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   120
// States of Restricted Transactional Memory usage.
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   121
enum RTMState {
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   122
  NoRTM      = 0x2, // Don't use RTM
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   123
  UseRTM     = 0x1, // Use RTM
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   124
  ProfileRTM = 0x0  // Use RTM with abort ratio calculation
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   125
};
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   126
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   127
#ifndef INCLUDE_RTM_OPT
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   128
#define INCLUDE_RTM_OPT 0
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   129
#endif
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   130
#if INCLUDE_RTM_OPT
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   131
#define RTM_OPT_ONLY(code) code
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   132
#else
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   133
#define RTM_OPT_ONLY(code)
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   134
#endif
70ec5a09a0d5 8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
diff changeset
   135
50589
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   136
class CompilerConfig : public AllStatic {
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   137
public:
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   138
  // Scale compile thresholds
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   139
  // Returns threshold scaled with CompileThresholdScaling
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   140
  static intx scaled_compile_threshold(intx threshold, double scale);
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   141
  static intx scaled_compile_threshold(intx threshold);
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   142
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   143
  // Returns freq_log scaled with CompileThresholdScaling
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   144
  static intx scaled_freq_log(intx freq_log, double scale);
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   145
  static intx scaled_freq_log(intx freq_log);
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   146
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   147
  static bool check_args_consistency(bool status);
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   148
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   149
  static void ergo_initialize();
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   150
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   151
private:
58926
ecb801342b8c 8233429: Minimal and zero VM build broken after JDK-8227003
jiefu
parents: 58894
diff changeset
   152
  TIERED_ONLY(static void set_tiered_flags();)
50589
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   153
};
e5d741569070 8184349: There should be some verification that EnableJVMCI is disabled if a GC not supporting JVMCI is selected
kvn
parents: 47687
diff changeset
   154
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50729
diff changeset
   155
#endif // SHARE_COMPILER_COMPILERDEFINITIONS_HPP