globals.hpp revision 9095:5459f44b1a75
189857Sobrien/*
289857Sobrien * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
389857Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489857Sobrien *
589857Sobrien * This code is free software; you can redistribute it and/or modify it
689857Sobrien * under the terms of the GNU General Public License version 2 only, as
789857Sobrien * published by the Free Software Foundation.
889857Sobrien *
989857Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT
1089857Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1189857Sobrien * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1289857Sobrien * version 2 for more details (a copy is included in the LICENSE file that
1389857Sobrien * accompanied this code).
1489857Sobrien *
1589857Sobrien * You should have received a copy of the GNU General Public License version
1689857Sobrien * 2 along with this work; if not, write to the Free Software Foundation,
1789857Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1889857Sobrien *
1989857Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2089857Sobrien * or visit www.oracle.com if you need additional information or have any
2189857Sobrien * questions.
2289857Sobrien *
2389857Sobrien */
2489857Sobrien
2589857Sobrien#ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
2689857Sobrien#define SHARE_VM_RUNTIME_GLOBALS_HPP
2789857Sobrien
2889857Sobrien#include "utilities/debug.hpp"
2989857Sobrien#include <float.h> // for DBL_MAX
3089857Sobrien
3189857Sobrien// use this for flags that are true per default in the tiered build
3289857Sobrien// but false in non-tiered builds, and vice versa
3389857Sobrien#ifdef TIERED
3489857Sobrien#define  trueInTiered true
3589857Sobrien#define falseInTiered false
3689857Sobrien#else
3789857Sobrien#define  trueInTiered false
3889857Sobrien#define falseInTiered true
3989857Sobrien#endif
4089857Sobrien
4189857Sobrien#ifdef TARGET_ARCH_x86
4289857Sobrien# include "globals_x86.hpp"
4389857Sobrien#endif
4489857Sobrien#ifdef TARGET_ARCH_sparc
4589857Sobrien# include "globals_sparc.hpp"
4689857Sobrien#endif
4789857Sobrien#ifdef TARGET_ARCH_zero
4889857Sobrien# include "globals_zero.hpp"
4989857Sobrien#endif
5089857Sobrien#ifdef TARGET_ARCH_arm
5189857Sobrien# include "globals_arm.hpp"
5289857Sobrien#endif
5389857Sobrien#ifdef TARGET_ARCH_ppc
5489857Sobrien# include "globals_ppc.hpp"
5589857Sobrien#endif
5689857Sobrien#ifdef TARGET_ARCH_aarch64
5789857Sobrien# include "globals_aarch64.hpp"
5889857Sobrien#endif
5989857Sobrien#ifdef TARGET_OS_FAMILY_linux
6089857Sobrien# include "globals_linux.hpp"
6189857Sobrien#endif
6289857Sobrien#ifdef TARGET_OS_FAMILY_solaris
6389857Sobrien# include "globals_solaris.hpp"
6489857Sobrien#endif
6589857Sobrien#ifdef TARGET_OS_FAMILY_windows
6689857Sobrien# include "globals_windows.hpp"
6789857Sobrien#endif
6889857Sobrien#ifdef TARGET_OS_FAMILY_aix
69130561Sobrien# include "globals_aix.hpp"
7089857Sobrien#endif
7189857Sobrien#ifdef TARGET_OS_FAMILY_bsd
7289857Sobrien# include "globals_bsd.hpp"
7389857Sobrien#endif
7489857Sobrien#ifdef TARGET_OS_ARCH_linux_x86
7589857Sobrien# include "globals_linux_x86.hpp"
7689857Sobrien#endif
7789857Sobrien#ifdef TARGET_OS_ARCH_linux_sparc
7889857Sobrien# include "globals_linux_sparc.hpp"
7989857Sobrien#endif
8089857Sobrien#ifdef TARGET_OS_ARCH_linux_zero
8189857Sobrien# include "globals_linux_zero.hpp"
8289857Sobrien#endif
8389857Sobrien#ifdef TARGET_OS_ARCH_solaris_x86
8489857Sobrien# include "globals_solaris_x86.hpp"
8589857Sobrien#endif
8689857Sobrien#ifdef TARGET_OS_ARCH_solaris_sparc
8789857Sobrien# include "globals_solaris_sparc.hpp"
8889857Sobrien#endif
8989857Sobrien#ifdef TARGET_OS_ARCH_windows_x86
9089857Sobrien# include "globals_windows_x86.hpp"
9189857Sobrien#endif
9289857Sobrien#ifdef TARGET_OS_ARCH_linux_arm
9389857Sobrien# include "globals_linux_arm.hpp"
9489857Sobrien#endif
9589857Sobrien#ifdef TARGET_OS_ARCH_linux_ppc
9689857Sobrien# include "globals_linux_ppc.hpp"
9789857Sobrien#endif
9889857Sobrien#ifdef TARGET_OS_ARCH_linux_aarch64
9989857Sobrien# include "globals_linux_aarch64.hpp"
10089857Sobrien#endif
10189857Sobrien#ifdef TARGET_OS_ARCH_aix_ppc
10289857Sobrien# include "globals_aix_ppc.hpp"
10389857Sobrien#endif
10489857Sobrien#ifdef TARGET_OS_ARCH_bsd_x86
10589857Sobrien# include "globals_bsd_x86.hpp"
10689857Sobrien#endif
10789857Sobrien#ifdef TARGET_OS_ARCH_bsd_zero
10889857Sobrien# include "globals_bsd_zero.hpp"
10989857Sobrien#endif
11089857Sobrien#ifdef COMPILER1
11189857Sobrien#ifdef TARGET_ARCH_x86
11289857Sobrien# include "c1_globals_x86.hpp"
11389857Sobrien#endif
11489857Sobrien#ifdef TARGET_ARCH_sparc
11589857Sobrien# include "c1_globals_sparc.hpp"
11689857Sobrien#endif
11789857Sobrien#ifdef TARGET_ARCH_arm
11889857Sobrien# include "c1_globals_arm.hpp"
11989857Sobrien#endif
12089857Sobrien#ifdef TARGET_ARCH_aarch64
12189857Sobrien# include "c1_globals_aarch64.hpp"
12289857Sobrien#endif
12389857Sobrien#ifdef TARGET_OS_FAMILY_linux
12489857Sobrien# include "c1_globals_linux.hpp"
12589857Sobrien#endif
12689857Sobrien#ifdef TARGET_OS_FAMILY_solaris
12789857Sobrien# include "c1_globals_solaris.hpp"
12889857Sobrien#endif
12989857Sobrien#ifdef TARGET_OS_FAMILY_windows
13089857Sobrien# include "c1_globals_windows.hpp"
13189857Sobrien#endif
13289857Sobrien#ifdef TARGET_OS_FAMILY_aix
13389857Sobrien# include "c1_globals_aix.hpp"
13489857Sobrien#endif
13589857Sobrien#ifdef TARGET_OS_FAMILY_bsd
13689857Sobrien# include "c1_globals_bsd.hpp"
13789857Sobrien#endif
13889857Sobrien#ifdef TARGET_ARCH_ppc
13989857Sobrien# include "c1_globals_ppc.hpp"
14089857Sobrien#endif
14189857Sobrien#endif
14289857Sobrien#ifdef COMPILER2
14389857Sobrien#ifdef TARGET_ARCH_x86
14489857Sobrien# include "c2_globals_x86.hpp"
14589857Sobrien#endif
14689857Sobrien#ifdef TARGET_ARCH_sparc
14789857Sobrien# include "c2_globals_sparc.hpp"
14889857Sobrien#endif
14989857Sobrien#ifdef TARGET_ARCH_arm
15089857Sobrien# include "c2_globals_arm.hpp"
15189857Sobrien#endif
15289857Sobrien#ifdef TARGET_ARCH_ppc
15389857Sobrien# include "c2_globals_ppc.hpp"
15489857Sobrien#endif
15589857Sobrien#ifdef TARGET_ARCH_aarch64
15689857Sobrien# include "c2_globals_aarch64.hpp"
15789857Sobrien#endif
15889857Sobrien#ifdef TARGET_OS_FAMILY_linux
15989857Sobrien# include "c2_globals_linux.hpp"
16089857Sobrien#endif
16189857Sobrien#ifdef TARGET_OS_FAMILY_solaris
16289857Sobrien# include "c2_globals_solaris.hpp"
16389857Sobrien#endif
16489857Sobrien#ifdef TARGET_OS_FAMILY_windows
16589857Sobrien# include "c2_globals_windows.hpp"
16689857Sobrien#endif
16789857Sobrien#ifdef TARGET_OS_FAMILY_aix
16889857Sobrien# include "c2_globals_aix.hpp"
16989857Sobrien#endif
17089857Sobrien#ifdef TARGET_OS_FAMILY_bsd
17189857Sobrien# include "c2_globals_bsd.hpp"
17289857Sobrien#endif
17389857Sobrien#endif
17489857Sobrien#ifdef SHARK
17589857Sobrien#ifdef TARGET_ARCH_zero
17689857Sobrien# include "shark_globals_zero.hpp"
17789857Sobrien#endif
17889857Sobrien#endif
17989857Sobrien
18089857Sobrien#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
18189857Sobriendefine_pd_global(bool, BackgroundCompilation,        false);
18289857Sobriendefine_pd_global(bool, UseTLAB,                      false);
18389857Sobriendefine_pd_global(bool, CICompileOSR,                 false);
18489857Sobriendefine_pd_global(bool, UseTypeProfile,               false);
18589857Sobriendefine_pd_global(bool, UseOnStackReplacement,        false);
18689857Sobriendefine_pd_global(bool, InlineIntrinsics,             false);
18789857Sobriendefine_pd_global(bool, PreferInterpreterNativeStubs, true);
18889857Sobriendefine_pd_global(bool, ProfileInterpreter,           false);
18989857Sobriendefine_pd_global(bool, ProfileTraps,                 false);
19089857Sobriendefine_pd_global(bool, TieredCompilation,            false);
19189857Sobrien
19289857Sobriendefine_pd_global(intx, CompileThreshold,             0);
19389857Sobrien
19489857Sobriendefine_pd_global(intx, OnStackReplacePercentage,     0);
19589857Sobriendefine_pd_global(bool, ResizeTLAB,                   false);
19689857Sobriendefine_pd_global(intx, FreqInlineSize,               0);
19789857Sobriendefine_pd_global(size_t, NewSizeThreadIncrease,      4*K);
19889857Sobriendefine_pd_global(intx, InlineClassNatives,           true);
19989857Sobriendefine_pd_global(intx, InlineUnsafeOps,              true);
20089857Sobriendefine_pd_global(intx, InitialCodeCacheSize,         160*K);
20189857Sobriendefine_pd_global(intx, ReservedCodeCacheSize,        32*M);
20289857Sobriendefine_pd_global(intx, NonProfiledCodeHeapSize,      0);
20389857Sobriendefine_pd_global(intx, ProfiledCodeHeapSize,         0);
20489857Sobriendefine_pd_global(intx, NonNMethodCodeHeapSize,       32*M);
20589857Sobrien
20689857Sobriendefine_pd_global(intx, CodeCacheExpansionSize,       32*K);
20789857Sobriendefine_pd_global(intx, CodeCacheMinBlockLength,      1);
20889857Sobriendefine_pd_global(intx, CodeCacheMinimumUseSpace,     200*K);
20989857Sobriendefine_pd_global(size_t, MetaspaceSize,              ScaleForWordSize(4*M));
21089857Sobriendefine_pd_global(bool, NeverActAsServerClassMachine, true);
21189857Sobriendefine_pd_global(uint64_t,MaxRAM,                    1ULL*G);
21289857Sobrien#define CI_COMPILER_COUNT 0
21389857Sobrien#else
21489857Sobrien
21589857Sobrien#ifdef COMPILER2
21689857Sobrien#define CI_COMPILER_COUNT 2
21789857Sobrien#else
21889857Sobrien#define CI_COMPILER_COUNT 1
21989857Sobrien#endif // COMPILER2
22089857Sobrien
221130561Sobrien#endif // no compilers
22289857Sobrien
22389857Sobrien// string type aliases used only in this file
22489857Sobrientypedef const char* ccstr;
22589857Sobrientypedef const char* ccstrlist;   // represents string arguments which accumulate
22689857Sobrien
22789857Sobrienstruct Flag {
22889857Sobrien  enum Flags {
22989857Sobrien    // value origin
23089857Sobrien    DEFAULT          = 0,
23189857Sobrien    COMMAND_LINE     = 1,
23289857Sobrien    ENVIRON_VAR      = 2,
23389857Sobrien    CONFIG_FILE      = 3,
23489857Sobrien    MANAGEMENT       = 4,
23589857Sobrien    ERGONOMIC        = 5,
23689857Sobrien    ATTACH_ON_DEMAND = 6,
23789857Sobrien    INTERNAL         = 7,
23889857Sobrien
23989857Sobrien    LAST_VALUE_ORIGIN = INTERNAL,
24089857Sobrien    VALUE_ORIGIN_BITS = 4,
24189857Sobrien    VALUE_ORIGIN_MASK = right_n_bits(VALUE_ORIGIN_BITS),
24289857Sobrien
24389857Sobrien    // flag kind
24489857Sobrien    KIND_PRODUCT            = 1 << 4,
24589857Sobrien    KIND_MANAGEABLE         = 1 << 5,
24689857Sobrien    KIND_DIAGNOSTIC         = 1 << 6,
24789857Sobrien    KIND_EXPERIMENTAL       = 1 << 7,
24889857Sobrien    KIND_NOT_PRODUCT        = 1 << 8,
24989857Sobrien    KIND_DEVELOP            = 1 << 9,
25089857Sobrien    KIND_PLATFORM_DEPENDENT = 1 << 10,
25189857Sobrien    KIND_READ_WRITE         = 1 << 11,
25289857Sobrien    KIND_C1                 = 1 << 12,
25389857Sobrien    KIND_C2                 = 1 << 13,
25489857Sobrien    KIND_ARCH               = 1 << 14,
25589857Sobrien    KIND_SHARK              = 1 << 15,
25689857Sobrien    KIND_LP64_PRODUCT       = 1 << 16,
25789857Sobrien    KIND_COMMERCIAL         = 1 << 17,
25889857Sobrien
25989857Sobrien    KIND_MASK = ~VALUE_ORIGIN_MASK
26089857Sobrien  };
26189857Sobrien
26289857Sobrien  enum Error {
26389857Sobrien    // no error
26489857Sobrien    SUCCESS = 0,
26589857Sobrien    // flag name is missing
26689857Sobrien    MISSING_NAME,
26789857Sobrien    // flag value is missing
26889857Sobrien    MISSING_VALUE,
26989857Sobrien    // error parsing the textual form of the value
27089857Sobrien    WRONG_FORMAT,
27189857Sobrien    // flag is not writeable
27289857Sobrien    NON_WRITABLE,
27389857Sobrien    // flag value is outside of its bounds
27489857Sobrien    OUT_OF_BOUNDS,
27589857Sobrien    // flag value violates its constraint
27689857Sobrien    VIOLATES_CONSTRAINT,
27789857Sobrien    // there is no flag with the given name
27889857Sobrien    INVALID_FLAG,
27989857Sobrien    // other, unspecified error related to setting the flag
28089857Sobrien    ERR_OTHER
28189857Sobrien  };
28289857Sobrien
28389857Sobrien  const char* _type;
28489857Sobrien  const char* _name;
28589857Sobrien  void* _addr;
28689857Sobrien  NOT_PRODUCT(const char* _doc;)
28789857Sobrien  Flags _flags;
28889857Sobrien
28989857Sobrien  // points to all Flags static array
29089857Sobrien  static Flag* flags;
29189857Sobrien
29289857Sobrien  // number of flags
29389857Sobrien  static size_t numFlags;
29489857Sobrien
29589857Sobrien  static Flag* find_flag(const char* name) { return find_flag(name, strlen(name), true, true); };
29689857Sobrien  static Flag* find_flag(const char* name, size_t length, bool allow_locked = false, bool return_flag = false);
29789857Sobrien  static Flag* fuzzy_match(const char* name, size_t length, bool allow_locked = false);
29889857Sobrien
29989857Sobrien  void check_writable();
30089857Sobrien
30189857Sobrien  bool is_bool() const;
30289857Sobrien  bool get_bool() const;
30389857Sobrien  void set_bool(bool value);
30489857Sobrien
30589857Sobrien  bool is_int() const;
30689857Sobrien  int get_int() const;
30789857Sobrien  void set_int(int value);
30889857Sobrien
30989857Sobrien  bool is_uint() const;
31089857Sobrien  uint get_uint() const;
31189857Sobrien  void set_uint(uint value);
31289857Sobrien
31389857Sobrien  bool is_intx() const;
31489857Sobrien  intx get_intx() const;
31589857Sobrien  void set_intx(intx value);
31689857Sobrien
31789857Sobrien  bool is_uintx() const;
31889857Sobrien  uintx get_uintx() const;
31989857Sobrien  void set_uintx(uintx value);
32089857Sobrien
32189857Sobrien  bool is_uint64_t() const;
32289857Sobrien  uint64_t get_uint64_t() const;
32389857Sobrien  void set_uint64_t(uint64_t value);
32489857Sobrien
32589857Sobrien  bool is_size_t() const;
32689857Sobrien  size_t get_size_t() const;
32789857Sobrien  void set_size_t(size_t value);
32889857Sobrien
32989857Sobrien  bool is_double() const;
33089857Sobrien  double get_double() const;
33189857Sobrien  void set_double(double value);
33289857Sobrien
33389857Sobrien  bool is_ccstr() const;
33489857Sobrien  bool ccstr_accumulates() const;
33589857Sobrien  ccstr get_ccstr() const;
33689857Sobrien  void set_ccstr(ccstr value);
33789857Sobrien
33889857Sobrien  Flags get_origin();
33989857Sobrien  void set_origin(Flags origin);
34089857Sobrien
34189857Sobrien  bool is_default();
34289857Sobrien  bool is_ergonomic();
34389857Sobrien  bool is_command_line();
34489857Sobrien
34589857Sobrien  bool is_product() const;
34689857Sobrien  bool is_manageable() const;
34789857Sobrien  bool is_diagnostic() const;
34889857Sobrien  bool is_experimental() const;
34989857Sobrien  bool is_notproduct() const;
35089857Sobrien  bool is_develop() const;
35189857Sobrien  bool is_read_write() const;
35289857Sobrien  bool is_commercial() const;
35389857Sobrien
35489857Sobrien  bool is_constant_in_binary() const;
35589857Sobrien
35689857Sobrien  bool is_unlocker() const;
35789857Sobrien  bool is_unlocked() const;
35889857Sobrien  bool is_writeable() const;
35989857Sobrien  bool is_external() const;
36089857Sobrien
36189857Sobrien  bool is_unlocker_ext() const;
36289857Sobrien  bool is_unlocked_ext() const;
36389857Sobrien  bool is_writeable_ext() const;
36489857Sobrien  bool is_external_ext() const;
36589857Sobrien
36689857Sobrien  void unlock_diagnostic();
36789857Sobrien
36889857Sobrien  void get_locked_message(char*, int) const;
36989857Sobrien  void get_locked_message_ext(char*, int) const;
37089857Sobrien
37189857Sobrien  // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
37289857Sobrien  void print_on(outputStream* st, bool withComments = false, bool printRanges = false);
37389857Sobrien  void print_kind(outputStream* st);
37489857Sobrien  void print_as_flag(outputStream* st);
37589857Sobrien
37689857Sobrien  static const char* flag_error_str(Flag::Error error);
37789857Sobrien};
37889857Sobrien
37989857Sobrien// debug flags control various aspects of the VM and are global accessible
38089857Sobrien
38189857Sobrien// use FlagSetting to temporarily change some debug flag
38289857Sobrien// e.g. FlagSetting fs(DebugThisAndThat, true);
38389857Sobrien// restored to previous value upon leaving scope
38489857Sobrienclass FlagSetting {
38589857Sobrien  bool val;
38689857Sobrien  bool* flag;
38789857Sobrien public:
38889857Sobrien  FlagSetting(bool& fl, bool newValue) { flag = &fl; val = fl; fl = newValue; }
38989857Sobrien  ~FlagSetting()                       { *flag = val; }
39089857Sobrien};
39189857Sobrien
39289857Sobrien
39389857Sobrienclass CounterSetting {
39489857Sobrien  intx* counter;
39589857Sobrien public:
39689857Sobrien  CounterSetting(intx* cnt) { counter = cnt; (*counter)++; }
39789857Sobrien  ~CounterSetting()         { (*counter)--; }
39889857Sobrien};
39989857Sobrien
40089857Sobrienclass IntFlagSetting {
40189857Sobrien  int val;
40289857Sobrien  int* flag;
40389857Sobrien public:
40489857Sobrien  IntFlagSetting(int& fl, int newValue) { flag = &fl; val = fl; fl = newValue; }
40589857Sobrien  ~IntFlagSetting()                     { *flag = val; }
40689857Sobrien};
40789857Sobrien
40889857Sobrienclass UIntFlagSetting {
40989857Sobrien  uint val;
41089857Sobrien  uint* flag;
41189857Sobrien public:
41289857Sobrien  UIntFlagSetting(uint& fl, uint newValue) { flag = &fl; val = fl; fl = newValue; }
41389857Sobrien  ~UIntFlagSetting()                       { *flag = val; }
41489857Sobrien};
41589857Sobrien
41689857Sobrienclass UIntXFlagSetting {
41789857Sobrien  uintx val;
41889857Sobrien  uintx* flag;
41989857Sobrien public:
42089857Sobrien  UIntXFlagSetting(uintx& fl, uintx newValue) { flag = &fl; val = fl; fl = newValue; }
42189857Sobrien  ~UIntXFlagSetting()                         { *flag = val; }
42289857Sobrien};
42389857Sobrien
42489857Sobrienclass DoubleFlagSetting {
42589857Sobrien  double val;
42689857Sobrien  double* flag;
42789857Sobrien public:
42889857Sobrien  DoubleFlagSetting(double& fl, double newValue) { flag = &fl; val = fl; fl = newValue; }
42989857Sobrien  ~DoubleFlagSetting()                           { *flag = val; }
43089857Sobrien};
43189857Sobrien
43289857Sobrienclass SizeTFlagSetting {
43389857Sobrien  size_t val;
43489857Sobrien  size_t* flag;
43589857Sobrien public:
43689857Sobrien  SizeTFlagSetting(size_t& fl, size_t newValue) { flag = &fl; val = fl; fl = newValue; }
43789857Sobrien  ~SizeTFlagSetting()                           { *flag = val; }
43889857Sobrien};
43989857Sobrien
44089857Sobrien
44189857Sobrienclass CommandLineFlags {
44289857Sobrienpublic:
44389857Sobrien  static Flag::Error boolAt(const char* name, size_t len, bool* value, bool allow_locked = false, bool return_flag = false);
44489857Sobrien  static Flag::Error boolAt(const char* name, bool* value, bool allow_locked = false, bool return_flag = false)      { return boolAt(name, strlen(name), value, allow_locked, return_flag); }
44589857Sobrien  static Flag::Error boolAtPut(const char* name, size_t len, bool* value, Flag::Flags origin);
44689857Sobrien  static Flag::Error boolAtPut(const char* name, bool* value, Flag::Flags origin)   { return boolAtPut(name, strlen(name), value, origin); }
44789857Sobrien
44889857Sobrien  static Flag::Error intAt(const char* name, size_t len, int* value, bool allow_locked = false, bool return_flag = false);
44989857Sobrien  static Flag::Error intAt(const char* name, int* value, bool allow_locked = false, bool return_flag = false)      { return intAt(name, strlen(name), value, allow_locked, return_flag); }
45089857Sobrien  static Flag::Error intAtPut(const char* name, size_t len, int* value, Flag::Flags origin);
45189857Sobrien  static Flag::Error intAtPut(const char* name, int* value, Flag::Flags origin)   { return intAtPut(name, strlen(name), value, origin); }
45289857Sobrien
45389857Sobrien  static Flag::Error uintAt(const char* name, size_t len, uint* value, bool allow_locked = false, bool return_flag = false);
45489857Sobrien  static Flag::Error uintAt(const char* name, uint* value, bool allow_locked = false, bool return_flag = false)      { return uintAt(name, strlen(name), value, allow_locked, return_flag); }
45589857Sobrien  static Flag::Error uintAtPut(const char* name, size_t len, uint* value, Flag::Flags origin);
45689857Sobrien  static Flag::Error uintAtPut(const char* name, uint* value, Flag::Flags origin)   { return uintAtPut(name, strlen(name), value, origin); }
45789857Sobrien
45889857Sobrien  static Flag::Error intxAt(const char* name, size_t len, intx* value, bool allow_locked = false, bool return_flag = false);
45989857Sobrien  static Flag::Error intxAt(const char* name, intx* value, bool allow_locked = false, bool return_flag = false)      { return intxAt(name, strlen(name), value, allow_locked, return_flag); }
46089857Sobrien  static Flag::Error intxAtPut(const char* name, size_t len, intx* value, Flag::Flags origin);
46189857Sobrien  static Flag::Error intxAtPut(const char* name, intx* value, Flag::Flags origin)   { return intxAtPut(name, strlen(name), value, origin); }
46289857Sobrien
46389857Sobrien  static Flag::Error uintxAt(const char* name, size_t len, uintx* value, bool allow_locked = false, bool return_flag = false);
46489857Sobrien  static Flag::Error uintxAt(const char* name, uintx* value, bool allow_locked = false, bool return_flag = false)    { return uintxAt(name, strlen(name), value, allow_locked, return_flag); }
46589857Sobrien  static Flag::Error uintxAtPut(const char* name, size_t len, uintx* value, Flag::Flags origin);
46689857Sobrien  static Flag::Error uintxAtPut(const char* name, uintx* value, Flag::Flags origin) { return uintxAtPut(name, strlen(name), value, origin); }
46789857Sobrien
46889857Sobrien  static Flag::Error size_tAt(const char* name, size_t len, size_t* value, bool allow_locked = false, bool return_flag = false);
46989857Sobrien  static Flag::Error size_tAt(const char* name, size_t* value, bool allow_locked = false, bool return_flag = false)    { return size_tAt(name, strlen(name), value, allow_locked, return_flag); }
47089857Sobrien  static Flag::Error size_tAtPut(const char* name, size_t len, size_t* value, Flag::Flags origin);
47189857Sobrien  static Flag::Error size_tAtPut(const char* name, size_t* value, Flag::Flags origin) { return size_tAtPut(name, strlen(name), value, origin); }
47289857Sobrien
47389857Sobrien  static Flag::Error uint64_tAt(const char* name, size_t len, uint64_t* value, bool allow_locked = false, bool return_flag = false);
47489857Sobrien  static Flag::Error uint64_tAt(const char* name, uint64_t* value, bool allow_locked = false, bool return_flag = false) { return uint64_tAt(name, strlen(name), value, allow_locked, return_flag); }
47589857Sobrien  static Flag::Error uint64_tAtPut(const char* name, size_t len, uint64_t* value, Flag::Flags origin);
47689857Sobrien  static Flag::Error uint64_tAtPut(const char* name, uint64_t* value, Flag::Flags origin) { return uint64_tAtPut(name, strlen(name), value, origin); }
47789857Sobrien
47889857Sobrien  static Flag::Error doubleAt(const char* name, size_t len, double* value, bool allow_locked = false, bool return_flag = false);
47989857Sobrien  static Flag::Error doubleAt(const char* name, double* value, bool allow_locked = false, bool return_flag = false)    { return doubleAt(name, strlen(name), value, allow_locked, return_flag); }
48089857Sobrien  static Flag::Error doubleAtPut(const char* name, size_t len, double* value, Flag::Flags origin);
48189857Sobrien  static Flag::Error doubleAtPut(const char* name, double* value, Flag::Flags origin) { return doubleAtPut(name, strlen(name), value, origin); }
48289857Sobrien
48389857Sobrien  static Flag::Error ccstrAt(const char* name, size_t len, ccstr* value, bool allow_locked = false, bool return_flag = false);
48489857Sobrien  static Flag::Error ccstrAt(const char* name, ccstr* value, bool allow_locked = false, bool return_flag = false)    { return ccstrAt(name, strlen(name), value, allow_locked, return_flag); }
48589857Sobrien  // Contract:  Flag will make private copy of the incoming value.
48689857Sobrien  // Outgoing value is always malloc-ed, and caller MUST call free.
48789857Sobrien  static Flag::Error ccstrAtPut(const char* name, size_t len, ccstr* value, Flag::Flags origin);
48889857Sobrien  static Flag::Error ccstrAtPut(const char* name, ccstr* value, Flag::Flags origin) { return ccstrAtPut(name, strlen(name), value, origin); }
48989857Sobrien
49089857Sobrien  // Returns false if name is not a command line flag.
49189857Sobrien  static bool wasSetOnCmdline(const char* name, bool* value);
49289857Sobrien  static void printSetFlags(outputStream* out);
49389857Sobrien
49489857Sobrien  // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
49589857Sobrien  static void printFlags(outputStream* out, bool withComments, bool printRanges = false);
49689857Sobrien
49789857Sobrien  static void verify() PRODUCT_RETURN;
49889857Sobrien};
49989857Sobrien
50089857Sobrien// use this for flags that are true by default in the debug version but
50189857Sobrien// false in the optimized version, and vice versa
50289857Sobrien#ifdef ASSERT
50389857Sobrien#define trueInDebug  true
50489857Sobrien#define falseInDebug false
50589857Sobrien#else
50689857Sobrien#define trueInDebug  false
50789857Sobrien#define falseInDebug true
50889857Sobrien#endif
50989857Sobrien
51089857Sobrien// use this for flags that are true per default in the product build
51189857Sobrien// but false in development builds, and vice versa
51289857Sobrien#ifdef PRODUCT
51389857Sobrien#define trueInProduct  true
51489857Sobrien#define falseInProduct false
51589857Sobrien#else
51689857Sobrien#define trueInProduct  false
51789857Sobrien#define falseInProduct true
51889857Sobrien#endif
51989857Sobrien
52089857Sobrien#ifdef JAVASE_EMBEDDED
52189857Sobrien#define falseInEmbedded false
52289857Sobrien#else
52389857Sobrien#define falseInEmbedded true
524#endif
525
526// develop flags are settable / visible only during development and are constant in the PRODUCT version
527// product flags are always settable / visible
528// notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
529
530// A flag must be declared with one of the following types:
531// bool, intx, uintx, size_t, ccstr, double, or uint64_t.
532// The type "ccstr" is an alias for "const char*" and is used
533// only in this file, because the macrology requires single-token type names.
534
535// Note: Diagnostic options not meant for VM tuning or for product modes.
536// They are to be used for VM quality assurance or field diagnosis
537// of VM bugs.  They are hidden so that users will not be encouraged to
538// try them as if they were VM ordinary execution options.  However, they
539// are available in the product version of the VM.  Under instruction
540// from support engineers, VM customers can turn them on to collect
541// diagnostic information about VM problems.  To use a VM diagnostic
542// option, you must first specify +UnlockDiagnosticVMOptions.
543// (This master switch also affects the behavior of -Xprintflags.)
544//
545// experimental flags are in support of features that are not
546//    part of the officially supported product, but are available
547//    for experimenting with. They could, for example, be performance
548//    features that may not have undergone full or rigorous QA, but which may
549//    help performance in some cases and released for experimentation
550//    by the community of users and developers. This flag also allows one to
551//    be able to build a fully supported product that nonetheless also
552//    ships with some unsupported, lightly tested, experimental features.
553//    Like the UnlockDiagnosticVMOptions flag above, there is a corresponding
554//    UnlockExperimentalVMOptions flag, which allows the control and
555//    modification of the experimental flags.
556//
557// Nota bene: neither diagnostic nor experimental options should be used casually,
558//    and they are not supported on production loads, except under explicit
559//    direction from support engineers.
560//
561// manageable flags are writeable external product flags.
562//    They are dynamically writeable through the JDK management interface
563//    (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole.
564//    These flags are external exported interface (see CCC).  The list of
565//    manageable flags can be queried programmatically through the management
566//    interface.
567//
568//    A flag can be made as "manageable" only if
569//    - the flag is defined in a CCC as an external exported interface.
570//    - the VM implementation supports dynamic setting of the flag.
571//      This implies that the VM must *always* query the flag variable
572//      and not reuse state related to the flag state at any given time.
573//    - you want the flag to be queried programmatically by the customers.
574//
575// product_rw flags are writeable internal product flags.
576//    They are like "manageable" flags but for internal/private use.
577//    The list of product_rw flags are internal/private flags which
578//    may be changed/removed in a future release.  It can be set
579//    through the management interface to get/set value
580//    when the name of flag is supplied.
581//
582//    A flag can be made as "product_rw" only if
583//    - the VM implementation supports dynamic setting of the flag.
584//      This implies that the VM must *always* query the flag variable
585//      and not reuse state related to the flag state at any given time.
586//
587// Note that when there is a need to support develop flags to be writeable,
588// it can be done in the same way as product_rw.
589//
590// range is a macro that will expand to min and max arguments for range
591//    checking code if provided - see commandLineFlagRangeList.hpp
592//
593// constraint is a macro that will expand to custom function call
594//    for constraint checking if provided - see commandLineFlagConstraintList.hpp
595//
596
597#define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product, range, constraint) \
598                                                                            \
599  lp64_product(bool, UseCompressedOops, false,                              \
600          "Use 32-bit object references in 64-bit VM. "                     \
601          "lp64_product means flag is always constant in 32 bit VM")        \
602                                                                            \
603  lp64_product(bool, UseCompressedClassPointers, false,                     \
604          "Use 32-bit class pointers in 64-bit VM. "                        \
605          "lp64_product means flag is always constant in 32 bit VM")        \
606                                                                            \
607  notproduct(bool, CheckCompressedOops, true,                               \
608          "Generate checks in encoding/decoding code in debug VM")          \
609                                                                            \
610  product_pd(size_t, HeapBaseMinAddress,                                    \
611          "OS specific low limit for heap base address")                    \
612                                                                            \
613  product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17),                        \
614          "Heap allocation steps through preferred address regions to find" \
615          " where it can allocate the heap. Number of steps to take per "   \
616          "region.")                                                        \
617          range(1, max_uintx)                                               \
618                                                                            \
619  diagnostic(bool, PrintCompressedOopsMode, false,                          \
620          "Print compressed oops base address and encoding mode")           \
621                                                                            \
622  lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
623          "Default object alignment in bytes, 8 is minimum")                \
624          range(8, 256)                                                     \
625          constraint(ObjectAlignmentInBytesConstraintFunc,AtParse)          \
626                                                                            \
627  product(bool, AssumeMP, false,                                            \
628          "Instruct the VM to assume multiple processors are available")    \
629                                                                            \
630  /* UseMembar is theoretically a temp flag used for memory barrier      */ \
631  /* removal testing.  It was supposed to be removed before FCS but has  */ \
632  /* been re-added (see 6401008)                                         */ \
633  product_pd(bool, UseMembar,                                               \
634          "(Unstable) Issues membars on thread state transitions")          \
635                                                                            \
636  develop(bool, CleanChunkPoolAsync, falseInEmbedded,                       \
637          "Clean the chunk pool asynchronously")                            \
638                                                                            \
639  experimental(bool, AlwaysSafeConstructors, false,                         \
640          "Force safe construction, as if all fields are final.")           \
641                                                                            \
642  diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug,                  \
643          "Enable normal processing of flags relating to field diagnostics")\
644                                                                            \
645  experimental(bool, UnlockExperimentalVMOptions, false,                    \
646          "Enable normal processing of flags relating to experimental "     \
647          "features")                                                       \
648                                                                            \
649  product(bool, JavaMonitorsInStackTrace, true,                             \
650          "Print information about Java monitor locks when the stacks are"  \
651          "dumped")                                                         \
652                                                                            \
653  product_pd(bool, UseLargePages,                                           \
654          "Use large page memory")                                          \
655                                                                            \
656  product_pd(bool, UseLargePagesIndividualAllocation,                       \
657          "Allocate large pages individually for better affinity")          \
658                                                                            \
659  develop(bool, LargePagesIndividualAllocationInjectError, false,           \
660          "Fail large pages individual allocation")                         \
661                                                                            \
662  product(bool, UseLargePagesInMetaspace, false,                            \
663          "Use large page memory in metaspace. "                            \
664          "Only used if UseLargePages is enabled.")                         \
665                                                                            \
666  develop(bool, TracePageSizes, false,                                      \
667          "Trace page size selection and usage")                            \
668                                                                            \
669  product(bool, UseNUMA, false,                                             \
670          "Use NUMA if available")                                          \
671                                                                            \
672  product(bool, UseNUMAInterleaving, false,                                 \
673          "Interleave memory across NUMA nodes if available")               \
674                                                                            \
675  product(size_t, NUMAInterleaveGranularity, 2*M,                           \
676          "Granularity to use for NUMA interleaving on Windows OS")         \
677                                                                            \
678  product(bool, ForceNUMA, false,                                           \
679          "Force NUMA optimizations on single-node/UMA systems")            \
680                                                                            \
681  product(uintx, NUMAChunkResizeWeight, 20,                                 \
682          "Percentage (0-100) used to weight the current sample when "      \
683          "computing exponentially decaying average for "                   \
684          "AdaptiveNUMAChunkSizing")                                        \
685          range(0, 100)                                                     \
686                                                                            \
687  product(size_t, NUMASpaceResizeRate, 1*G,                                 \
688          "Do not reallocate more than this amount per collection")         \
689                                                                            \
690  product(bool, UseAdaptiveNUMAChunkSizing, true,                           \
691          "Enable adaptive chunk sizing for NUMA")                          \
692                                                                            \
693  product(bool, NUMAStats, false,                                           \
694          "Print NUMA stats in detailed heap information")                  \
695                                                                            \
696  product(uintx, NUMAPageScanRate, 256,                                     \
697          "Maximum number of pages to include in the page scan procedure")  \
698                                                                            \
699  product_pd(bool, NeedsDeoptSuspend,                                       \
700          "True for register window machines (sparc/ia64)")                 \
701                                                                            \
702  product(intx, UseSSE, 99,                                                 \
703          "Highest supported SSE instructions set on x86/x64")              \
704                                                                            \
705  product(bool, UseAES, false,                                              \
706          "Control whether AES instructions can be used on x86/x64")        \
707                                                                            \
708  product(bool, UseSHA, false,                                              \
709          "Control whether SHA instructions can be used "                   \
710          "on SPARC and on ARM")                                            \
711                                                                            \
712  product(bool, UseGHASHIntrinsics, false,                                  \
713          "Use intrinsics for GHASH versions of crypto")                    \
714                                                                            \
715  product(size_t, LargePageSizeInBytes, 0,                                  \
716          "Large page size (0 to let VM choose the page size)")             \
717                                                                            \
718  product(size_t, LargePageHeapSizeThreshold, 128*M,                        \
719          "Use large pages if maximum heap is at least this big")           \
720                                                                            \
721  product(bool, ForceTimeHighResolution, false,                             \
722          "Using high time resolution (for Win32 only)")                    \
723                                                                            \
724  develop(bool, TraceItables, false,                                        \
725          "Trace initialization and use of itables")                        \
726                                                                            \
727  develop(bool, TracePcPatching, false,                                     \
728          "Trace usage of frame::patch_pc")                                 \
729                                                                            \
730  develop(bool, TraceJumps, false,                                          \
731          "Trace assembly jumps in thread ring buffer")                     \
732                                                                            \
733  develop(bool, TraceRelocator, false,                                      \
734          "Trace the bytecode relocator")                                   \
735                                                                            \
736  develop(bool, TraceLongCompiles, false,                                   \
737          "Print out every time compilation is longer than "                \
738          "a given threshold")                                              \
739                                                                            \
740  develop(bool, SafepointALot, false,                                       \
741          "Generate a lot of safepoints. This works with "                  \
742          "GuaranteedSafepointInterval")                                    \
743                                                                            \
744  product_pd(bool, BackgroundCompilation,                                   \
745          "A thread requesting compilation is not blocked during "          \
746          "compilation")                                                    \
747                                                                            \
748  product(bool, PrintVMQWaitTime, false,                                    \
749          "Print out the waiting time in VM operation queue")               \
750                                                                            \
751  develop(bool, TraceOopMapGeneration, false,                               \
752          "Show OopMapGeneration")                                          \
753                                                                            \
754  product(bool, MethodFlushing, true,                                       \
755          "Reclamation of zombie and not-entrant methods")                  \
756                                                                            \
757  develop(bool, VerifyStack, false,                                         \
758          "Verify stack of each thread when it is entering a runtime call") \
759                                                                            \
760  diagnostic(bool, ForceUnreachable, false,                                 \
761          "Make all non code cache addresses to be unreachable by "         \
762          "forcing use of 64bit literal fixups")                            \
763                                                                            \
764  notproduct(bool, StressDerivedPointers, false,                            \
765          "Force scavenge when a derived pointer is detected on stack "     \
766          "after rtm call")                                                 \
767                                                                            \
768  develop(bool, TraceDerivedPointers, false,                                \
769          "Trace traversal of derived pointers on stack")                   \
770                                                                            \
771  notproduct(bool, TraceCodeBlobStacks, false,                              \
772          "Trace stack-walk of codeblobs")                                  \
773                                                                            \
774  product(bool, PrintJNIResolving, false,                                   \
775          "Used to implement -v:jni")                                       \
776                                                                            \
777  notproduct(bool, PrintRewrites, false,                                    \
778          "Print methods that are being rewritten")                         \
779                                                                            \
780  product(bool, UseInlineCaches, true,                                      \
781          "Use Inline Caches for virtual calls ")                           \
782                                                                            \
783  develop(bool, InlineArrayCopy, true,                                      \
784          "Inline arraycopy native that is known to be part of "            \
785          "base library DLL")                                               \
786                                                                            \
787  develop(bool, InlineObjectHash, true,                                     \
788          "Inline Object::hashCode() native that is known to be part "      \
789          "of base library DLL")                                            \
790                                                                            \
791  develop(bool, InlineNatives, true,                                        \
792          "Inline natives that are known to be part of base library DLL")   \
793                                                                            \
794  develop(bool, InlineMathNatives, true,                                    \
795          "Inline SinD, CosD, etc.")                                        \
796                                                                            \
797  develop(bool, InlineClassNatives, true,                                   \
798          "Inline Class.isInstance, etc")                                   \
799                                                                            \
800  develop(bool, InlineThreadNatives, true,                                  \
801          "Inline Thread.currentThread, etc")                               \
802                                                                            \
803  develop(bool, InlineUnsafeOps, true,                                      \
804          "Inline memory ops (native methods) from sun.misc.Unsafe")        \
805                                                                            \
806  product(bool, CriticalJNINatives, true,                                   \
807          "Check for critical JNI entry points")                            \
808                                                                            \
809  notproduct(bool, StressCriticalJNINatives, false,                         \
810          "Exercise register saving code in critical natives")              \
811                                                                            \
812  product(bool, UseSSE42Intrinsics, false,                                  \
813          "SSE4.2 versions of intrinsics")                                  \
814                                                                            \
815  product(bool, UseAESIntrinsics, false,                                    \
816          "Use intrinsics for AES versions of crypto")                      \
817                                                                            \
818  product(bool, UseSHA1Intrinsics, false,                                   \
819          "Use intrinsics for SHA-1 crypto hash function. "                 \
820          "Requires that UseSHA is enabled.")                               \
821                                                                            \
822  product(bool, UseSHA256Intrinsics, false,                                 \
823          "Use intrinsics for SHA-224 and SHA-256 crypto hash functions. "  \
824          "Requires that UseSHA is enabled.")                               \
825                                                                            \
826  product(bool, UseSHA512Intrinsics, false,                                 \
827          "Use intrinsics for SHA-384 and SHA-512 crypto hash functions. "  \
828          "Requires that UseSHA is enabled.")                               \
829                                                                            \
830  product(bool, UseCRC32Intrinsics, false,                                  \
831          "use intrinsics for java.util.zip.CRC32")                         \
832                                                                            \
833  product(bool, UseCRC32CIntrinsics, false,                                 \
834          "use intrinsics for java.util.zip.CRC32C")                        \
835                                                                            \
836  product(bool, UseAdler32Intrinsics, false,                                \
837          "use intrinsics for java.util.zip.Adler32")                       \
838                                                                            \
839  diagnostic(ccstrlist, DisableIntrinsic, "",                               \
840         "do not expand intrinsics whose (internal) names appear here")     \
841                                                                            \
842  develop(bool, TraceCallFixup, false,                                      \
843          "Trace all call fixups")                                          \
844                                                                            \
845  develop(bool, DeoptimizeALot, false,                                      \
846          "Deoptimize at every exit from the runtime system")               \
847                                                                            \
848  notproduct(ccstrlist, DeoptimizeOnlyAt, "",                               \
849          "A comma separated list of bcis to deoptimize at")                \
850                                                                            \
851  product(bool, DeoptimizeRandom, false,                                    \
852          "Deoptimize random frames on random exit from the runtime system")\
853                                                                            \
854  notproduct(bool, ZombieALot, false,                                       \
855          "Create zombies (non-entrant) at exit from the runtime system")   \
856                                                                            \
857  product(bool, UnlinkSymbolsALot, false,                                   \
858          "Unlink unreferenced symbols from the symbol table at safepoints")\
859                                                                            \
860  notproduct(bool, WalkStackALot, false,                                    \
861          "Trace stack (no print) at every exit from the runtime system")   \
862                                                                            \
863  product(bool, Debugging, false,                                           \
864          "Set when executing debug methods in debug.cpp "                  \
865          "(to prevent triggering assertions)")                             \
866                                                                            \
867  notproduct(bool, StrictSafepointChecks, trueInDebug,                      \
868          "Enable strict checks that safepoints cannot happen for threads " \
869          "that use No_Safepoint_Verifier")                                 \
870                                                                            \
871  notproduct(bool, VerifyLastFrame, false,                                  \
872          "Verify oops on last frame on entry to VM")                       \
873                                                                            \
874  develop(bool, TraceHandleAllocation, false,                               \
875          "Print out warnings when suspiciously many handles are allocated")\
876                                                                            \
877  product(bool, FailOverToOldVerifier, true,                                \
878          "Fail over to old verifier when split verifier fails")            \
879                                                                            \
880  develop(bool, ShowSafepointMsgs, false,                                   \
881          "Show message about safepoint synchronization")                   \
882                                                                            \
883  product(bool, SafepointTimeout, false,                                    \
884          "Time out and warn or fail after SafepointTimeoutDelay "          \
885          "milliseconds if failed to reach safepoint")                      \
886                                                                            \
887  develop(bool, DieOnSafepointTimeout, false,                               \
888          "Die upon failure to reach safepoint (see SafepointTimeout)")     \
889                                                                            \
890  /* 50 retries * (5 * current_retry_count) millis = ~6.375 seconds */      \
891  /* typically, at most a few retries are needed                    */      \
892  product(intx, SuspendRetryCount, 50,                                      \
893          "Maximum retry count for an external suspend request")            \
894                                                                            \
895  product(intx, SuspendRetryDelay, 5,                                       \
896          "Milliseconds to delay per retry (* current_retry_count)")        \
897                                                                            \
898  product(bool, AssertOnSuspendWaitFailure, false,                          \
899          "Assert/Guarantee on external suspend wait failure")              \
900                                                                            \
901  product(bool, TraceSuspendWaitFailures, false,                            \
902          "Trace external suspend wait failures")                           \
903                                                                            \
904  product(bool, MaxFDLimit, true,                                           \
905          "Bump the number of file descriptors to maximum in Solaris")      \
906                                                                            \
907  diagnostic(bool, LogEvents, true,                                         \
908          "Enable the various ring buffer event logs")                      \
909                                                                            \
910  diagnostic(uintx, LogEventsBufferEntries, 10,                             \
911          "Number of ring buffer event logs")                               \
912          range(1, NOT_LP64(1*K) LP64_ONLY(1*M))                            \
913                                                                            \
914  product(bool, BytecodeVerificationRemote, true,                           \
915          "Enable the Java bytecode verifier for remote classes")           \
916                                                                            \
917  product(bool, BytecodeVerificationLocal, false,                           \
918          "Enable the Java bytecode verifier for local classes")            \
919                                                                            \
920  develop(bool, ForceFloatExceptions, trueInDebug,                          \
921          "Force exceptions on FP stack under/overflow")                    \
922                                                                            \
923  develop(bool, VerifyStackAtCalls, false,                                  \
924          "Verify that the stack pointer is unchanged after calls")         \
925                                                                            \
926  develop(bool, TraceJavaAssertions, false,                                 \
927          "Trace java language assertions")                                 \
928                                                                            \
929  notproduct(bool, CheckAssertionStatusDirectives, false,                   \
930          "Temporary - see javaClasses.cpp")                                \
931                                                                            \
932  notproduct(bool, PrintMallocFree, false,                                  \
933          "Trace calls to C heap malloc/free allocation")                   \
934                                                                            \
935  product(bool, PrintOopAddress, false,                                     \
936          "Always print the location of the oop")                           \
937                                                                            \
938  notproduct(bool, VerifyCodeCache, false,                                  \
939          "Verify code cache on memory allocation/deallocation")            \
940                                                                            \
941  develop(bool, UseMallocOnly, false,                                       \
942          "Use only malloc/free for allocation (no resource area/arena)")   \
943                                                                            \
944  develop(bool, PrintMalloc, false,                                         \
945          "Print all malloc/free calls")                                    \
946                                                                            \
947  develop(bool, PrintMallocStatistics, false,                               \
948          "Print malloc/free statistics")                                   \
949                                                                            \
950  develop(bool, ZapResourceArea, trueInDebug,                               \
951          "Zap freed resource/arena space with 0xABABABAB")                 \
952                                                                            \
953  notproduct(bool, ZapVMHandleArea, trueInDebug,                            \
954          "Zap freed VM handle space with 0xBCBCBCBC")                      \
955                                                                            \
956  develop(bool, ZapJNIHandleArea, trueInDebug,                              \
957          "Zap freed JNI handle space with 0xFEFEFEFE")                     \
958                                                                            \
959  notproduct(bool, ZapStackSegments, trueInDebug,                           \
960          "Zap allocated/freed stack segments with 0xFADFADED")             \
961                                                                            \
962  develop(bool, ZapUnusedHeapArea, trueInDebug,                             \
963          "Zap unused heap space with 0xBAADBABE")                          \
964                                                                            \
965  develop(bool, TraceZapUnusedHeapArea, false,                              \
966          "Trace zapping of unused heap space")                             \
967                                                                            \
968  develop(bool, CheckZapUnusedHeapArea, false,                              \
969          "Check zapping of unused heap space")                             \
970                                                                            \
971  develop(bool, ZapFillerObjects, trueInDebug,                              \
972          "Zap filler objects with 0xDEAFBABE")                             \
973                                                                            \
974  develop(bool, PrintVMMessages, true,                                      \
975          "Print VM messages on console")                                   \
976                                                                            \
977  product(bool, PrintGCApplicationConcurrentTime, false,                    \
978          "Print the time the application has been running")                \
979                                                                            \
980  product(bool, PrintGCApplicationStoppedTime, false,                       \
981          "Print the time the application has been stopped")                \
982                                                                            \
983  diagnostic(bool, VerboseVerification, false,                              \
984          "Display detailed verification details")                          \
985                                                                            \
986  notproduct(uintx, ErrorHandlerTest, 0,                                    \
987          "If > 0, provokes an error after VM initialization; the value "   \
988          "determines which error to provoke. See test_error_handler() "    \
989          "in debug.cpp.")                                                  \
990                                                                            \
991  notproduct(uintx, TestCrashInErrorHandler, 0,                             \
992          "If > 0, provokes an error inside VM error handler (a secondary " \
993          "crash). see test_error_handler() in debug.cpp.")                 \
994                                                                            \
995  notproduct(bool, TestSafeFetchInErrorHandler, false,                      \
996          "If true, tests SafeFetch inside error handler.")                 \
997                                                                            \
998  develop(bool, Verbose, false,                                             \
999          "Print additional debugging information from other modes")        \
1000                                                                            \
1001  develop(bool, PrintMiscellaneous, false,                                  \
1002          "Print uncategorized debugging information (requires +Verbose)")  \
1003                                                                            \
1004  develop(bool, WizardMode, false,                                          \
1005          "Print much more debugging information")                          \
1006                                                                            \
1007  product(bool, ShowMessageBoxOnError, false,                               \
1008          "Keep process alive on VM fatal error")                           \
1009                                                                            \
1010  product(bool, CreateCoredumpOnCrash, true,                                \
1011          "Create core/mini dump on VM fatal error")                        \
1012                                                                            \
1013  product(uintx, ErrorLogTimeout, 2 * 60,                                   \
1014          "Timeout, in seconds, to limit the time spent on writing an "     \
1015          "error log in case of a crash.")                                  \
1016                                                                            \
1017  product_pd(bool, UseOSErrorReporting,                                     \
1018          "Let VM fatal error propagate to the OS (ie. WER on Windows)")    \
1019                                                                            \
1020  product(bool, SuppressFatalErrorMessage, false,                           \
1021          "Report NO fatal error message (avoid deadlock)")                 \
1022                                                                            \
1023  product(ccstrlist, OnError, "",                                           \
1024          "Run user-defined commands on fatal error; see VMError.cpp "      \
1025          "for examples")                                                   \
1026                                                                            \
1027  product(ccstrlist, OnOutOfMemoryError, "",                                \
1028          "Run user-defined commands on first java.lang.OutOfMemoryError")  \
1029                                                                            \
1030  manageable(bool, HeapDumpBeforeFullGC, false,                             \
1031          "Dump heap to file before any major stop-the-world GC")           \
1032                                                                            \
1033  manageable(bool, HeapDumpAfterFullGC, false,                              \
1034          "Dump heap to file after any major stop-the-world GC")            \
1035                                                                            \
1036  manageable(bool, HeapDumpOnOutOfMemoryError, false,                       \
1037          "Dump heap to file when java.lang.OutOfMemoryError is thrown")    \
1038                                                                            \
1039  manageable(ccstr, HeapDumpPath, NULL,                                     \
1040          "When HeapDumpOnOutOfMemoryError is on, the path (filename or "   \
1041          "directory) of the dump file (defaults to java_pid<pid>.hprof "   \
1042          "in the working directory)")                                      \
1043                                                                            \
1044  develop(size_t, SegmentedHeapDumpThreshold, 2*G,                          \
1045          "Generate a segmented heap dump (JAVA PROFILE 1.0.2 format) "     \
1046          "when the heap usage is larger than this")                        \
1047                                                                            \
1048  develop(size_t, HeapDumpSegmentSize, 1*G,                                 \
1049          "Approximate segment size when generating a segmented heap dump") \
1050                                                                            \
1051  develop(bool, BreakAtWarning, false,                                      \
1052          "Execute breakpoint upon encountering VM warning")                \
1053                                                                            \
1054  develop(bool, TraceVMOperation, false,                                    \
1055          "Trace VM operations")                                            \
1056                                                                            \
1057  develop(bool, UseFakeTimers, false,                                       \
1058          "Tell whether the VM should use system time or a fake timer")     \
1059                                                                            \
1060  product(ccstr, NativeMemoryTracking, "off",                               \
1061          "Native memory tracking options")                                 \
1062                                                                            \
1063  diagnostic(bool, PrintNMTStatistics, false,                               \
1064          "Print native memory tracking summary data if it is on")          \
1065                                                                            \
1066  diagnostic(bool, LogCompilation, false,                                   \
1067          "Log compilation activity in detail to LogFile")                  \
1068                                                                            \
1069  product(bool, PrintCompilation, false,                                    \
1070          "Print compilations")                                             \
1071                                                                            \
1072  diagnostic(bool, TraceNMethodInstalls, false,                             \
1073          "Trace nmethod installation")                                     \
1074                                                                            \
1075  diagnostic(intx, ScavengeRootsInCode, 2,                                  \
1076          "0: do not allow scavengable oops in the code cache; "            \
1077          "1: allow scavenging from the code cache; "                       \
1078          "2: emit as many constants as the compiler can see")              \
1079          range(0, 2)                                                       \
1080                                                                            \
1081  product(bool, AlwaysRestoreFPU, false,                                    \
1082          "Restore the FPU control word after every JNI call (expensive)")  \
1083                                                                            \
1084  diagnostic(bool, PrintCompilation2, false,                                \
1085          "Print additional statistics per compilation")                    \
1086                                                                            \
1087  diagnostic(bool, PrintAdapterHandlers, false,                             \
1088          "Print code generated for i2c/c2i adapters")                      \
1089                                                                            \
1090  diagnostic(bool, VerifyAdapterCalls, trueInDebug,                         \
1091          "Verify that i2c/c2i adapters are called properly")               \
1092                                                                            \
1093  develop(bool, VerifyAdapterSharing, false,                                \
1094          "Verify that the code for shared adapters is the equivalent")     \
1095                                                                            \
1096  diagnostic(bool, PrintAssembly, false,                                    \
1097          "Print assembly code (using external disassembler.so)")           \
1098                                                                            \
1099  diagnostic(ccstr, PrintAssemblyOptions, NULL,                             \
1100          "Print options string passed to disassembler.so")                 \
1101                                                                            \
1102  diagnostic(bool, PrintNMethods, false,                                    \
1103          "Print assembly code for nmethods when generated")                \
1104                                                                            \
1105  diagnostic(bool, PrintNativeNMethods, false,                              \
1106          "Print assembly code for native nmethods when generated")         \
1107                                                                            \
1108  develop(bool, PrintDebugInfo, false,                                      \
1109          "Print debug information for all nmethods when generated")        \
1110                                                                            \
1111  develop(bool, PrintRelocations, false,                                    \
1112          "Print relocation information for all nmethods when generated")   \
1113                                                                            \
1114  develop(bool, PrintDependencies, false,                                   \
1115          "Print dependency information for all nmethods when generated")   \
1116                                                                            \
1117  develop(bool, PrintExceptionHandlers, false,                              \
1118          "Print exception handler tables for all nmethods when generated") \
1119                                                                            \
1120  develop(bool, StressCompiledExceptionHandlers, false,                     \
1121          "Exercise compiled exception handlers")                           \
1122                                                                            \
1123  develop(bool, InterceptOSException, false,                                \
1124          "Start debugger when an implicit OS (e.g. NULL) "                 \
1125          "exception happens")                                              \
1126                                                                            \
1127  product(bool, PrintCodeCache, false,                                      \
1128          "Print the code cache memory usage when exiting")                 \
1129                                                                            \
1130  develop(bool, PrintCodeCache2, false,                                     \
1131          "Print detailed usage information on the code cache when exiting")\
1132                                                                            \
1133  product(bool, PrintCodeCacheOnCompilation, false,                         \
1134          "Print the code cache memory usage each time a method is "        \
1135          "compiled")                                                       \
1136                                                                            \
1137  diagnostic(bool, PrintStubCode, false,                                    \
1138          "Print generated stub code")                                      \
1139                                                                            \
1140  product(bool, StackTraceInThrowable, true,                                \
1141          "Collect backtrace in throwable when exception happens")          \
1142                                                                            \
1143  product(bool, OmitStackTraceInFastThrow, true,                            \
1144          "Omit backtraces for some 'hot' exceptions in optimized code")    \
1145                                                                            \
1146  product(bool, ProfilerPrintByteCodeStatistics, false,                     \
1147          "Print bytecode statistics when dumping profiler output")         \
1148                                                                            \
1149  product(bool, ProfilerRecordPC, false,                                    \
1150          "Collect ticks for each 16 byte interval of compiled code")       \
1151                                                                            \
1152  product(bool, ProfileVM, false,                                           \
1153          "Profile ticks that fall within VM (either in the VM Thread "     \
1154          "or VM code called through stubs)")                               \
1155                                                                            \
1156  product(bool, ProfileIntervals, false,                                    \
1157          "Print profiles for each interval (see ProfileIntervalsTicks)")   \
1158                                                                            \
1159  notproduct(bool, ProfilerCheckIntervals, false,                           \
1160          "Collect and print information on spacing of profiler ticks")     \
1161                                                                            \
1162  product(bool, PrintWarnings, true,                                        \
1163          "Print JVM warnings to output stream")                            \
1164                                                                            \
1165  notproduct(uintx, WarnOnStalledSpinLock, 0,                               \
1166          "Print warnings for stalled SpinLocks")                           \
1167                                                                            \
1168  product(bool, RegisterFinalizersAtInit, true,                             \
1169          "Register finalizable objects at end of Object.<init> or "        \
1170          "after allocation")                                               \
1171                                                                            \
1172  develop(bool, RegisterReferences, true,                                   \
1173          "Tell whether the VM should register soft/weak/final/phantom "    \
1174          "references")                                                     \
1175                                                                            \
1176  develop(bool, IgnoreRewrites, false,                                      \
1177          "Suppress rewrites of bytecodes in the oopmap generator. "        \
1178          "This is unsafe!")                                                \
1179                                                                            \
1180  develop(bool, PrintCodeCacheExtension, false,                             \
1181          "Print extension of code cache")                                  \
1182                                                                            \
1183  develop(bool, UsePrivilegedStack, true,                                   \
1184          "Enable the security JVM functions")                              \
1185                                                                            \
1186  develop(bool, ProtectionDomainVerification, true,                         \
1187          "Verify protection domain before resolution in system dictionary")\
1188                                                                            \
1189  product(bool, ClassUnloading, true,                                       \
1190          "Do unloading of classes")                                        \
1191                                                                            \
1192  product(bool, ClassUnloadingWithConcurrentMark, true,                     \
1193          "Do unloading of classes with a concurrent marking cycle")        \
1194                                                                            \
1195  develop(bool, DisableStartThread, false,                                  \
1196          "Disable starting of additional Java threads "                    \
1197          "(for debugging only)")                                           \
1198                                                                            \
1199  develop(bool, MemProfiling, false,                                        \
1200          "Write memory usage profiling to log file")                       \
1201                                                                            \
1202  notproduct(bool, PrintSystemDictionaryAtExit, false,                      \
1203          "Print the system dictionary at exit")                            \
1204                                                                            \
1205  experimental(intx, PredictedLoadedClassCount, 0,                          \
1206          "Experimental: Tune loaded class cache starting size")            \
1207                                                                            \
1208  diagnostic(bool, UnsyncloadClass, false,                                  \
1209          "Unstable: VM calls loadClass unsynchronized. Custom "            \
1210          "class loader must call VM synchronized for findClass "           \
1211          "and defineClass.")                                               \
1212                                                                            \
1213  product(bool, AlwaysLockClassLoader, false,                               \
1214          "Require the VM to acquire the class loader lock before calling " \
1215          "loadClass() even for class loaders registering "                 \
1216          "as parallel capable")                                            \
1217                                                                            \
1218  product(bool, AllowParallelDefineClass, false,                            \
1219          "Allow parallel defineClass requests for class loaders "          \
1220          "registering as parallel capable")                                \
1221                                                                            \
1222  product(bool, MustCallLoadClassInternal, false,                           \
1223          "Call loadClassInternal() rather than loadClass()")               \
1224                                                                            \
1225  product_pd(bool, DontYieldALot,                                           \
1226          "Throw away obvious excess yield calls")                          \
1227                                                                            \
1228  product_pd(bool, ConvertSleepToYield,                                     \
1229          "Convert sleep(0) to thread yield "                               \
1230          "(may be off for Solaris to improve GUI)")                        \
1231                                                                            \
1232  product(bool, ConvertYieldToSleep, false,                                 \
1233          "Convert yield to a sleep of MinSleepInterval to simulate Win32 " \
1234          "behavior")                                                       \
1235                                                                            \
1236  develop(bool, UseDetachedThreads, true,                                   \
1237          "Use detached threads that are recycled upon termination "        \
1238          "(for Solaris only)")                                             \
1239                                                                            \
1240  product(bool, UseLWPSynchronization, true,                                \
1241          "Use LWP-based instead of libthread-based synchronization "       \
1242          "(SPARC only)")                                                   \
1243                                                                            \
1244  experimental(ccstr, SyncKnobs, NULL,                                      \
1245               "(Unstable) Various monitor synchronization tunables")       \
1246                                                                            \
1247  experimental(intx, EmitSync, 0,                                           \
1248               "(Unsafe, Unstable) "                                        \
1249               "Control emission of inline sync fast-path code")            \
1250                                                                            \
1251  product(intx, MonitorBound, 0, "Bound Monitor population")                \
1252                                                                            \
1253  product(bool, MonitorInUseLists, false, "Track Monitors for Deflation")   \
1254                                                                            \
1255  experimental(intx, SyncFlags, 0, "(Unsafe, Unstable) "                    \
1256               "Experimental Sync flags")                                   \
1257                                                                            \
1258  experimental(intx, SyncVerbose, 0, "(Unstable)")                          \
1259                                                                            \
1260  diagnostic(bool, InlineNotify, true, "intrinsify subset of notify")       \
1261                                                                            \
1262  experimental(intx, ClearFPUAtPark, 0, "(Unsafe, Unstable)")               \
1263                                                                            \
1264  experimental(intx, hashCode, 5,                                           \
1265               "(Unstable) select hashCode generation algorithm")           \
1266                                                                            \
1267  experimental(intx, WorkAroundNPTLTimedWaitHang, 0,                        \
1268               "(Unstable, Linux-specific) "                                \
1269               "avoid NPTL-FUTEX hang pthread_cond_timedwait")              \
1270                                                                            \
1271  product(bool, FilterSpuriousWakeups, true,                                \
1272          "When true prevents OS-level spurious, or premature, wakeups "    \
1273          "from Object.wait (Ignored for Windows)")                         \
1274                                                                            \
1275  experimental(intx, NativeMonitorTimeout, -1, "(Unstable)")                \
1276                                                                            \
1277  experimental(intx, NativeMonitorFlags, 0, "(Unstable)")                   \
1278                                                                            \
1279  experimental(intx, NativeMonitorSpinLimit, 20, "(Unstable)")              \
1280                                                                            \
1281  develop(bool, UsePthreads, false,                                         \
1282          "Use pthread-based instead of libthread-based synchronization "   \
1283          "(SPARC only)")                                                   \
1284                                                                            \
1285  product(bool, ReduceSignalUsage, false,                                   \
1286          "Reduce the use of OS signals in Java and/or the VM")             \
1287                                                                            \
1288  develop_pd(bool, ShareVtableStubs,                                        \
1289          "Share vtable stubs (smaller code but worse branch prediction")   \
1290                                                                            \
1291  develop(bool, LoadLineNumberTables, true,                                 \
1292          "Tell whether the class file parser loads line number tables")    \
1293                                                                            \
1294  develop(bool, LoadLocalVariableTables, true,                              \
1295          "Tell whether the class file parser loads local variable tables") \
1296                                                                            \
1297  develop(bool, LoadLocalVariableTypeTables, true,                          \
1298          "Tell whether the class file parser loads local variable type"    \
1299          "tables")                                                         \
1300                                                                            \
1301  product(bool, AllowUserSignalHandlers, false,                             \
1302          "Do not complain if the application installs signal handlers "    \
1303          "(Solaris & Linux only)")                                         \
1304                                                                            \
1305  product(bool, UseSignalChaining, true,                                    \
1306          "Use signal-chaining to invoke signal handlers installed "        \
1307          "by the application (Solaris & Linux only)")                      \
1308                                                                            \
1309  product(bool, UseAltSigs, false,                                          \
1310          "Use alternate signals instead of SIGUSR1 & SIGUSR2 for VM "      \
1311          "internal signals (Solaris only)")                                \
1312                                                                            \
1313  product(bool, AllowJNIEnvProxy, false,                                    \
1314          "Allow JNIEnv proxies for jdbx")                                  \
1315                                                                            \
1316  product(bool, JNIDetachReleasesMonitors, true,                            \
1317          "JNI DetachCurrentThread releases monitors owned by thread")      \
1318                                                                            \
1319  product(bool, RestoreMXCSROnJNICalls, false,                              \
1320          "Restore MXCSR when returning from JNI calls")                    \
1321                                                                            \
1322  product(bool, CheckJNICalls, false,                                       \
1323          "Verify all arguments to JNI calls")                              \
1324                                                                            \
1325  product(bool, CheckEndorsedAndExtDirs, false,                             \
1326          "Verify the endorsed and extension directories are not used")     \
1327                                                                            \
1328  product(bool, UseFastJNIAccessors, true,                                  \
1329          "Use optimized versions of Get<Primitive>Field")                  \
1330                                                                            \
1331  product(intx, MaxJNILocalCapacity, 65536,                                 \
1332          "Maximum allowable local JNI handle capacity to "                 \
1333          "EnsureLocalCapacity() and PushLocalFrame(), "                    \
1334          "where <= 0 is unlimited, default: 65536")                        \
1335                                                                            \
1336  product(bool, EagerXrunInit, false,                                       \
1337          "Eagerly initialize -Xrun libraries; allows startup profiling, "  \
1338          "but not all -Xrun libraries may support the state of the VM "    \
1339          "at this time")                                                   \
1340                                                                            \
1341  product(bool, PreserveAllAnnotations, false,                              \
1342          "Preserve RuntimeInvisibleAnnotations as well "                   \
1343          "as RuntimeVisibleAnnotations")                                   \
1344                                                                            \
1345  develop(uintx, PreallocatedOutOfMemoryErrorCount, 4,                      \
1346          "Number of OutOfMemoryErrors preallocated with backtrace")        \
1347                                                                            \
1348  product(bool, UseXMMForArrayCopy, false,                                  \
1349          "Use SSE2 MOVQ instruction for Arraycopy")                        \
1350                                                                            \
1351  product(intx, FieldsAllocationStyle, 1,                                   \
1352          "0 - type based with oops first, "                                \
1353          "1 - with oops last, "                                            \
1354          "2 - oops in super and sub classes are together")                 \
1355          range(0, 2)                                                       \
1356                                                                            \
1357  product(bool, CompactFields, true,                                        \
1358          "Allocate nonstatic fields in gaps between previous fields")      \
1359                                                                            \
1360  notproduct(bool, PrintFieldLayout, false,                                 \
1361          "Print field layout for each class")                              \
1362                                                                            \
1363  /* Need to limit the extent of the padding to reasonable size.          */\
1364  /* 8K is well beyond the reasonable HW cache line size, even with       */\
1365  /* aggressive prefetching, while still leaving the room for segregating */\
1366  /* among the distinct pages.                                            */\
1367  product(intx, ContendedPaddingWidth, 128,                                 \
1368          "How many bytes to pad the fields/classes marked @Contended with")\
1369          range(0, 8192)                                                    \
1370          constraint(ContendedPaddingWidthConstraintFunc,AtParse)           \
1371                                                                            \
1372  product(bool, EnableContended, true,                                      \
1373          "Enable @Contended annotation support")                           \
1374                                                                            \
1375  product(bool, RestrictContended, true,                                    \
1376          "Restrict @Contended to trusted classes")                         \
1377                                                                            \
1378  product(bool, UseBiasedLocking, true,                                     \
1379          "Enable biased locking in JVM")                                   \
1380                                                                            \
1381  product(intx, BiasedLockingStartupDelay, 4000,                            \
1382          "Number of milliseconds to wait before enabling biased locking")  \
1383                                                                            \
1384  diagnostic(bool, PrintBiasedLockingStatistics, false,                     \
1385          "Print statistics of biased locking in JVM")                      \
1386                                                                            \
1387  product(intx, BiasedLockingBulkRebiasThreshold, 20,                       \
1388          "Threshold of number of revocations per type to try to "          \
1389          "rebias all objects in the heap of that type")                    \
1390                                                                            \
1391  product(intx, BiasedLockingBulkRevokeThreshold, 40,                       \
1392          "Threshold of number of revocations per type to permanently "     \
1393          "revoke biases of all objects in the heap of that type")          \
1394                                                                            \
1395  product(intx, BiasedLockingDecayTime, 25000,                              \
1396          "Decay time (in milliseconds) to re-enable bulk rebiasing of a "  \
1397          "type after previous bulk rebias")                                \
1398                                                                            \
1399  /* tracing */                                                             \
1400                                                                            \
1401  notproduct(bool, TraceRuntimeCalls, false,                                \
1402          "Trace run-time calls")                                           \
1403                                                                            \
1404  develop(bool, TraceJNICalls, false,                                       \
1405          "Trace JNI calls")                                                \
1406                                                                            \
1407  develop(bool, StressRewriter, false,                                      \
1408          "Stress linktime bytecode rewriting")                             \
1409                                                                            \
1410  notproduct(bool, TraceJVMCalls, false,                                    \
1411          "Trace JVM calls")                                                \
1412                                                                            \
1413  product(ccstr, TraceJVMTI, NULL,                                          \
1414          "Trace flags for JVMTI functions and events")                     \
1415                                                                            \
1416  /* This option can change an EMCP method into an obsolete method. */      \
1417  /* This can affect tests that except specific methods to be EMCP. */      \
1418  /* This option should be used with caution.                       */      \
1419  product(bool, StressLdcRewrite, false,                                    \
1420          "Force ldc -> ldc_w rewrite during RedefineClasses")              \
1421                                                                            \
1422  product(intx, TraceRedefineClasses, 0,                                    \
1423          "Trace level for JVMTI RedefineClasses")                          \
1424                                                                            \
1425  /* change to false by default sometime after Mustang */                   \
1426  product(bool, VerifyMergedCPBytecodes, true,                              \
1427          "Verify bytecodes after RedefineClasses constant pool merging")   \
1428                                                                            \
1429  develop(bool, TraceJNIHandleAllocation, false,                            \
1430          "Trace allocation/deallocation of JNI handle blocks")             \
1431                                                                            \
1432  develop(bool, TraceBytecodes, false,                                      \
1433          "Trace bytecode execution")                                       \
1434                                                                            \
1435  develop(bool, TraceClassInitialization, false,                            \
1436          "Trace class initialization")                                     \
1437                                                                            \
1438  product(bool, TraceExceptions, false,                                     \
1439          "Trace exceptions")                                               \
1440                                                                            \
1441  develop(bool, TraceICs, false,                                            \
1442          "Trace inline cache changes")                                     \
1443                                                                            \
1444  notproduct(bool, TraceInvocationCounterOverflow, false,                   \
1445          "Trace method invocation counter overflow")                       \
1446                                                                            \
1447  develop(bool, TraceInlineCacheClearing, false,                            \
1448          "Trace clearing of inline caches in nmethods")                    \
1449                                                                            \
1450  develop(bool, TraceDependencies, false,                                   \
1451          "Trace dependencies")                                             \
1452                                                                            \
1453  develop(bool, VerifyDependencies, trueInDebug,                            \
1454          "Exercise and verify the compilation dependency mechanism")       \
1455                                                                            \
1456  develop(bool, TraceNewOopMapGeneration, false,                            \
1457          "Trace OopMapGeneration")                                         \
1458                                                                            \
1459  develop(bool, TraceNewOopMapGenerationDetailed, false,                    \
1460          "Trace OopMapGeneration: print detailed cell states")             \
1461                                                                            \
1462  develop(bool, TimeOopMap, false,                                          \
1463          "Time calls to GenerateOopMap::compute_map() in sum")             \
1464                                                                            \
1465  develop(bool, TimeOopMap2, false,                                         \
1466          "Time calls to GenerateOopMap::compute_map() individually")       \
1467                                                                            \
1468  develop(bool, TraceMonitorMismatch, false,                                \
1469          "Trace monitor matching failures during OopMapGeneration")        \
1470                                                                            \
1471  develop(bool, TraceOopMapRewrites, false,                                 \
1472          "Trace rewriting of method oops during oop map generation")       \
1473                                                                            \
1474  develop(bool, TraceSafepoint, false,                                      \
1475          "Trace safepoint operations")                                     \
1476                                                                            \
1477  develop(bool, TraceICBuffer, false,                                       \
1478          "Trace usage of IC buffer")                                       \
1479                                                                            \
1480  develop(bool, TraceCompiledIC, false,                                     \
1481          "Trace changes of compiled IC")                                   \
1482                                                                            \
1483  develop(bool, TraceStartupTime, false,                                    \
1484          "Trace setup time")                                               \
1485                                                                            \
1486  develop(bool, TraceProtectionDomainVerification, false,                   \
1487          "Trace protection domain verification")                           \
1488                                                                            \
1489  develop(bool, TraceClearedExceptions, false,                              \
1490          "Print when an exception is forcibly cleared")                    \
1491                                                                            \
1492  product(bool, TraceClassResolution, false,                                \
1493          "Trace all constant pool resolutions (for debugging)")            \
1494                                                                            \
1495  product(bool, TraceBiasedLocking, false,                                  \
1496          "Trace biased locking in JVM")                                    \
1497                                                                            \
1498  product(bool, TraceMonitorInflation, false,                               \
1499          "Trace monitor inflation in JVM")                                 \
1500                                                                            \
1501  /* gc */                                                                  \
1502                                                                            \
1503  product(bool, UseSerialGC, false,                                         \
1504          "Use the Serial garbage collector")                               \
1505                                                                            \
1506  product(bool, UseG1GC, false,                                             \
1507          "Use the Garbage-First garbage collector")                        \
1508                                                                            \
1509  product(bool, UseParallelGC, false,                                       \
1510          "Use the Parallel Scavenge garbage collector")                    \
1511                                                                            \
1512  product(bool, UseParallelOldGC, false,                                    \
1513          "Use the Parallel Old garbage collector")                         \
1514                                                                            \
1515  product(uintx, HeapMaximumCompactionInterval, 20,                         \
1516          "How often should we maximally compact the heap (not allowing "   \
1517          "any dead space)")                                                \
1518                                                                            \
1519  product(uintx, HeapFirstMaximumCompactionCount, 3,                        \
1520          "The collection count for the first maximum compaction")          \
1521                                                                            \
1522  product(bool, UseMaximumCompactionOnSystemGC, true,                       \
1523          "Use maximum compaction in the Parallel Old garbage collector "   \
1524          "for a system GC")                                                \
1525                                                                            \
1526  product(uintx, ParallelOldDeadWoodLimiterMean, 50,                        \
1527          "The mean used by the parallel compact dead wood "                \
1528          "limiter (a number between 0-100)")                               \
1529          range(0, 100)                                                     \
1530                                                                            \
1531  product(uintx, ParallelOldDeadWoodLimiterStdDev, 80,                      \
1532          "The standard deviation used by the parallel compact dead wood "  \
1533          "limiter (a number between 0-100)")                               \
1534          range(0, 100)                                                     \
1535                                                                            \
1536  product(uint, ParallelGCThreads, 0,                                       \
1537          "Number of parallel threads parallel gc will use")                \
1538          constraint(ParallelGCThreadsConstraintFunc,AfterErgo)             \
1539                                                                            \
1540  diagnostic(bool, UseSemaphoreGCThreadsSynchronization, true,              \
1541            "Use semaphore synchronization for the GC Threads, "            \
1542            "instead of synchronization based on mutexes")                  \
1543                                                                            \
1544  product(bool, UseDynamicNumberOfGCThreads, false,                         \
1545          "Dynamically choose the number of parallel threads "              \
1546          "parallel gc will use")                                           \
1547                                                                            \
1548  diagnostic(bool, ForceDynamicNumberOfGCThreads, false,                    \
1549          "Force dynamic selection of the number of "                       \
1550          "parallel threads parallel gc will use to aid debugging")         \
1551                                                                            \
1552  product(size_t, HeapSizePerGCThread, ScaleForWordSize(64*M),              \
1553          "Size of heap (bytes) per GC thread used in calculating the "     \
1554          "number of GC threads")                                           \
1555          range((size_t)os::vm_page_size(), (size_t)max_uintx)              \
1556                                                                            \
1557  product(bool, TraceDynamicGCThreads, false,                               \
1558          "Trace the dynamic GC thread usage")                              \
1559                                                                            \
1560  develop(bool, ParallelOldGCSplitALot, false,                              \
1561          "Provoke splitting (copying data from a young gen space to "      \
1562          "multiple destination spaces)")                                   \
1563                                                                            \
1564  develop(uintx, ParallelOldGCSplitInterval, 3,                             \
1565          "How often to provoke splitting a young gen space")               \
1566          range(0, max_uintx)                                               \
1567                                                                            \
1568  product(uint, ConcGCThreads, 0,                                           \
1569          "Number of threads concurrent gc will use")                       \
1570          constraint(ConcGCThreadsConstraintFunc,AfterErgo)                 \
1571                                                                            \
1572  product(uintx, GCTaskTimeStampEntries, 200,                               \
1573          "Number of time stamp entries per gc worker thread")              \
1574          range(1, max_uintx)                                               \
1575                                                                            \
1576  product(bool, AlwaysTenure, false,                                        \
1577          "Always tenure objects in eden (ParallelGC only)")                \
1578                                                                            \
1579  product(bool, NeverTenure, false,                                         \
1580          "Never tenure objects in eden, may tenure on overflow "           \
1581          "(ParallelGC only)")                                              \
1582                                                                            \
1583  product(bool, ScavengeBeforeFullGC, true,                                 \
1584          "Scavenge youngest generation before each full GC.")              \
1585                                                                            \
1586  develop(bool, ScavengeWithObjectsInToSpace, false,                        \
1587          "Allow scavenges to occur when to-space contains objects")        \
1588                                                                            \
1589  product(bool, UseConcMarkSweepGC, false,                                  \
1590          "Use Concurrent Mark-Sweep GC in the old generation")             \
1591                                                                            \
1592  product(bool, ExplicitGCInvokesConcurrent, false,                         \
1593          "A System.gc() request invokes a concurrent collection; "         \
1594          "(effective only when using concurrent collectors)")              \
1595                                                                            \
1596  product(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false,        \
1597          "A System.gc() request invokes a concurrent collection and "      \
1598          "also unloads classes during such a concurrent gc cycle "         \
1599          "(effective only when UseConcMarkSweepGC)")                       \
1600                                                                            \
1601  product(bool, GCLockerInvokesConcurrent, false,                           \
1602          "The exit of a JNI critical section necessitating a scavenge, "   \
1603          "also kicks off a background concurrent collection")              \
1604                                                                            \
1605  product(uintx, GCLockerEdenExpansionPercent, 5,                           \
1606          "How much the GC can expand the eden by while the GC locker "     \
1607          "is active (as a percentage)")                                    \
1608          range(0, 100)                                                     \
1609                                                                            \
1610  diagnostic(uintx, GCLockerRetryAllocationCount, 2,                        \
1611          "Number of times to retry allocations when "                      \
1612          "blocked by the GC locker")                                       \
1613                                                                            \
1614  develop(bool, UseCMSAdaptiveFreeLists, true,                              \
1615          "Use adaptive free lists in the CMS generation")                  \
1616                                                                            \
1617  develop(bool, UseAsyncConcMarkSweepGC, true,                              \
1618          "Use Asynchronous Concurrent Mark-Sweep GC in the old generation")\
1619                                                                            \
1620  product(bool, UseCMSBestFit, true,                                        \
1621          "Use CMS best fit allocation strategy")                           \
1622                                                                            \
1623  product(bool, UseParNewGC, false,                                         \
1624          "Use parallel threads in the new generation")                     \
1625                                                                            \
1626  product(bool, PrintTaskqueue, false,                                      \
1627          "Print taskqueue statistics for parallel collectors")             \
1628                                                                            \
1629  product(bool, PrintTerminationStats, false,                               \
1630          "Print termination statistics for parallel collectors")           \
1631                                                                            \
1632  product(uintx, ParallelGCBufferWastePct, 10,                              \
1633          "Wasted fraction of parallel allocation buffer")                  \
1634          range(0, 100)                                                     \
1635                                                                            \
1636  product(uintx, TargetPLABWastePct, 10,                                    \
1637          "Target wasted space in last buffer as percent of overall "       \
1638          "allocation")                                                     \
1639          range(1, 100)                                                     \
1640                                                                            \
1641  product(uintx, PLABWeight, 75,                                            \
1642          "Percentage (0-100) used to weight the current sample when "      \
1643          "computing exponentially decaying average for ResizePLAB")        \
1644          range(0, 100)                                                     \
1645                                                                            \
1646  product(bool, ResizePLAB, true,                                           \
1647          "Dynamically resize (survivor space) promotion LAB's")            \
1648                                                                            \
1649  product(bool, PrintPLAB, false,                                           \
1650          "Print (survivor space) promotion LAB's sizing decisions")        \
1651                                                                            \
1652  product(intx, ParGCArrayScanChunk, 50,                                    \
1653          "Scan a subset of object array and push remainder, if array is "  \
1654          "bigger than this")                                               \
1655          range(1, max_intx)                                                \
1656                                                                            \
1657  product(bool, ParGCUseLocalOverflow, false,                               \
1658          "Instead of a global overflow list, use local overflow stacks")   \
1659                                                                            \
1660  product(bool, ParGCTrimOverflow, true,                                    \
1661          "Eagerly trim the local overflow lists "                          \
1662          "(when ParGCUseLocalOverflow)")                                   \
1663                                                                            \
1664  notproduct(bool, ParGCWorkQueueOverflowALot, false,                       \
1665          "Simulate work queue overflow in ParNew")                         \
1666                                                                            \
1667  notproduct(uintx, ParGCWorkQueueOverflowInterval, 1000,                   \
1668          "An `interval' counter that determines how frequently "           \
1669          "we simulate overflow; a smaller number increases frequency")     \
1670                                                                            \
1671  product(uintx, ParGCDesiredObjsFromOverflowList, 20,                      \
1672          "The desired number of objects to claim from the overflow list")  \
1673                                                                            \
1674  diagnostic(uintx, ParGCStridesPerThread, 2,                               \
1675          "The number of strides per worker thread that we divide up the "  \
1676          "card table scanning work into")                                  \
1677          range(1, max_uintx)                                               \
1678          constraint(ParGCStridesPerThreadConstraintFunc,AfterErgo)         \
1679                                                                            \
1680  diagnostic(intx, ParGCCardsPerStrideChunk, 256,                           \
1681          "The number of cards in each chunk of the parallel chunks used "  \
1682          "during card table scanning")                                     \
1683          range(1, max_intx)                                                \
1684                                                                            \
1685  product(uintx, OldPLABWeight, 50,                                         \
1686          "Percentage (0-100) used to weight the current sample when "      \
1687          "computing exponentially decaying average for resizing "          \
1688          "OldPLABSize")                                                    \
1689          range(0, 100)                                                     \
1690                                                                            \
1691  product(bool, ResizeOldPLAB, true,                                        \
1692          "Dynamically resize (old gen) promotion LAB's")                   \
1693                                                                            \
1694  product(bool, PrintOldPLAB, false,                                        \
1695          "Print (old gen) promotion LAB's sizing decisions")               \
1696                                                                            \
1697  product(size_t, CMSOldPLABMax, 1024,                                      \
1698          "Maximum size of CMS gen promotion LAB caches per worker "        \
1699          "per block size")                                                 \
1700          range(1, max_uintx)                                               \
1701          constraint(CMSOldPLABMaxConstraintFunc,AfterMemoryInit)           \
1702                                                                            \
1703  product(size_t, CMSOldPLABMin, 16,                                        \
1704          "Minimum size of CMS gen promotion LAB caches per worker "        \
1705          "per block size")                                                 \
1706          range(1, max_uintx)                                               \
1707          constraint(CMSOldPLABMinConstraintFunc,AfterMemoryInit)           \
1708                                                                            \
1709  product(uintx, CMSOldPLABNumRefills, 4,                                   \
1710          "Nominal number of refills of CMS gen promotion LAB cache "       \
1711          "per worker per block size")                                      \
1712          range(1, max_uintx)                                               \
1713                                                                            \
1714  product(bool, CMSOldPLABResizeQuicker, false,                             \
1715          "React on-the-fly during a scavenge to a sudden "                 \
1716          "change in block demand rate")                                    \
1717                                                                            \
1718  product(uintx, CMSOldPLABToleranceFactor, 4,                              \
1719          "The tolerance of the phase-change detector for on-the-fly "      \
1720          "PLAB resizing during a scavenge")                                \
1721          range(1, max_uintx)                                               \
1722                                                                            \
1723  product(uintx, CMSOldPLABReactivityFactor, 2,                             \
1724          "The gain in the feedback loop for on-the-fly PLAB resizing "     \
1725          "during a scavenge")                                              \
1726                                                                            \
1727  product(bool, AlwaysPreTouch, false,                                      \
1728          "Force all freshly committed pages to be pre-touched")            \
1729                                                                            \
1730  product_pd(size_t, CMSYoungGenPerWorker,                                  \
1731          "The maximum size of young gen chosen by default per GC worker "  \
1732          "thread available")                                               \
1733          range(1, max_uintx)                                               \
1734                                                                            \
1735  product(uintx, CMSIncrementalSafetyFactor, 10,                            \
1736          "Percentage (0-100) used to add conservatism when computing the " \
1737          "duty cycle")                                                     \
1738          range(0, 100)                                                     \
1739                                                                            \
1740  product(uintx, CMSExpAvgFactor, 50,                                       \
1741          "Percentage (0-100) used to weight the current sample when "      \
1742          "computing exponential averages for CMS statistics")              \
1743          range(0, 100)                                                     \
1744                                                                            \
1745  product(uintx, CMS_FLSWeight, 75,                                         \
1746          "Percentage (0-100) used to weight the current sample when "      \
1747          "computing exponentially decaying averages for CMS FLS "          \
1748          "statistics")                                                     \
1749          range(0, 100)                                                     \
1750                                                                            \
1751  product(uintx, CMS_FLSPadding, 1,                                         \
1752          "The multiple of deviation from mean to use for buffering "       \
1753          "against volatility in free list demand")                         \
1754                                                                            \
1755  product(uintx, FLSCoalescePolicy, 2,                                      \
1756          "CMS: aggressiveness level for coalescing, increasing "           \
1757          "from 0 to 4")                                                    \
1758          range(0, 4)                                                       \
1759                                                                            \
1760  product(bool, FLSAlwaysCoalesceLarge, false,                              \
1761          "CMS: larger free blocks are always available for coalescing")    \
1762                                                                            \
1763  product(double, FLSLargestBlockCoalesceProximity, 0.99,                   \
1764          "CMS: the smaller the percentage the greater the coalescing "     \
1765          "force")                                                          \
1766          range(0.0, 1.0)                                                   \
1767                                                                            \
1768  product(double, CMSSmallCoalSurplusPercent, 1.05,                         \
1769          "CMS: the factor by which to inflate estimated demand of small "  \
1770          "block sizes to prevent coalescing with an adjoining block")      \
1771          range(0.0, DBL_MAX)                                               \
1772                                                                            \
1773  product(double, CMSLargeCoalSurplusPercent, 0.95,                         \
1774          "CMS: the factor by which to inflate estimated demand of large "  \
1775          "block sizes to prevent coalescing with an adjoining block")      \
1776          range(0.0, DBL_MAX)                                               \
1777                                                                            \
1778  product(double, CMSSmallSplitSurplusPercent, 1.10,                        \
1779          "CMS: the factor by which to inflate estimated demand of small "  \
1780          "block sizes to prevent splitting to supply demand for smaller "  \
1781          "blocks")                                                         \
1782          range(0.0, DBL_MAX)                                               \
1783                                                                            \
1784  product(double, CMSLargeSplitSurplusPercent, 1.00,                        \
1785          "CMS: the factor by which to inflate estimated demand of large "  \
1786          "block sizes to prevent splitting to supply demand for smaller "  \
1787          "blocks")                                                         \
1788          range(0.0, DBL_MAX)                                               \
1789                                                                            \
1790  product(bool, CMSExtrapolateSweep, false,                                 \
1791          "CMS: cushion for block demand during sweep")                     \
1792                                                                            \
1793  product(uintx, CMS_SweepWeight, 75,                                       \
1794          "Percentage (0-100) used to weight the current sample when "      \
1795          "computing exponentially decaying average for inter-sweep "       \
1796          "duration")                                                       \
1797          range(0, 100)                                                     \
1798                                                                            \
1799  product(uintx, CMS_SweepPadding, 1,                                       \
1800          "The multiple of deviation from mean to use for buffering "       \
1801          "against volatility in inter-sweep duration")                     \
1802                                                                            \
1803  product(uintx, CMS_SweepTimerThresholdMillis, 10,                         \
1804          "Skip block flux-rate sampling for an epoch unless inter-sweep "  \
1805          "duration exceeds this threshold in milliseconds")                \
1806                                                                            \
1807  product(bool, CMSClassUnloadingEnabled, true,                             \
1808          "Whether class unloading enabled when using CMS GC")              \
1809                                                                            \
1810  product(uintx, CMSClassUnloadingMaxInterval, 0,                           \
1811          "When CMS class unloading is enabled, the maximum CMS cycle "     \
1812          "count for which classes may not be unloaded")                    \
1813                                                                            \
1814  develop(intx, CMSDictionaryChoice, 0,                                     \
1815          "Use BinaryTreeDictionary as default in the CMS generation")      \
1816          range(0, 2)                                                       \
1817                                                                            \
1818  product(uintx, CMSIndexedFreeListReplenish, 4,                            \
1819          "Replenish an indexed free list with this number of chunks")      \
1820          range(1, max_uintx)                                               \
1821                                                                            \
1822  product(bool, CMSReplenishIntermediate, true,                             \
1823          "Replenish all intermediate free-list caches")                    \
1824                                                                            \
1825  product(bool, CMSSplitIndexedFreeListBlocks, true,                        \
1826          "When satisfying batched demand, split blocks from the "          \
1827          "IndexedFreeList whose size is a multiple of requested size")     \
1828                                                                            \
1829  product(bool, CMSLoopWarn, false,                                         \
1830          "Warn in case of excessive CMS looping")                          \
1831                                                                            \
1832  develop(bool, CMSOverflowEarlyRestoration, false,                         \
1833          "Restore preserved marks early")                                  \
1834                                                                            \
1835  /* where does the range max value of (max_jint - 1) come from? */         \
1836  product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M),         \
1837          "Maximum size of marking stack")                                  \
1838          range(1, (max_jint - 1))                                          \
1839                                                                            \
1840  product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M),             \
1841          "Size of marking stack")                                          \
1842          constraint(MarkStackSizeConstraintFunc,AfterErgo)                 \
1843                                                                            \
1844  notproduct(bool, CMSMarkStackOverflowALot, false,                         \
1845          "Simulate frequent marking stack / work queue overflow")          \
1846                                                                            \
1847  notproduct(uintx, CMSMarkStackOverflowInterval, 1000,                     \
1848          "An \"interval\" counter that determines how frequently "         \
1849          "to simulate overflow; a smaller number increases frequency")     \
1850                                                                            \
1851  product(uintx, CMSMaxAbortablePrecleanLoops, 0,                           \
1852          "Maximum number of abortable preclean iterations, if > 0")        \
1853                                                                            \
1854  product(intx, CMSMaxAbortablePrecleanTime, 5000,                          \
1855          "Maximum time in abortable preclean (in milliseconds)")           \
1856          range(0, max_intx)                                                \
1857                                                                            \
1858  product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100,              \
1859          "Nominal minimum work per abortable preclean iteration")          \
1860                                                                            \
1861  manageable(intx, CMSAbortablePrecleanWaitMillis, 100,                     \
1862          "Time that we sleep between iterations when not given "           \
1863          "enough work per iteration")                                      \
1864          range(0, max_intx)                                                \
1865                                                                            \
1866  product(size_t, CMSRescanMultiple, 32,                                    \
1867          "Size (in cards) of CMS parallel rescan task")                    \
1868          range(1, max_uintx)                                               \
1869                                                                            \
1870  product(size_t, CMSConcMarkMultiple, 32,                                  \
1871          "Size (in cards) of CMS concurrent MT marking task")              \
1872          range(1, max_uintx)                                               \
1873                                                                            \
1874  product(bool, CMSAbortSemantics, false,                                   \
1875          "Whether abort-on-overflow semantics is implemented")             \
1876                                                                            \
1877  product(bool, CMSParallelInitialMarkEnabled, true,                        \
1878          "Use the parallel initial mark.")                                 \
1879                                                                            \
1880  product(bool, CMSParallelRemarkEnabled, true,                             \
1881          "Whether parallel remark enabled (only if ParNewGC)")             \
1882                                                                            \
1883  product(bool, CMSParallelSurvivorRemarkEnabled, true,                     \
1884          "Whether parallel remark of survivor space "                      \
1885          "enabled (effective only if CMSParallelRemarkEnabled)")           \
1886                                                                            \
1887  product(bool, CMSPLABRecordAlways, true,                                  \
1888          "Always record survivor space PLAB boundaries (effective only "   \
1889          "if CMSParallelSurvivorRemarkEnabled)")                           \
1890                                                                            \
1891  product(bool, CMSEdenChunksRecordAlways, true,                            \
1892          "Always record eden chunks used for the parallel initial mark "   \
1893          "or remark of eden")                                              \
1894                                                                            \
1895  product(bool, CMSPrintEdenSurvivorChunks, false,                          \
1896          "Print the eden and the survivor chunks used for the parallel "   \
1897          "initial mark or remark of the eden/survivor spaces")             \
1898                                                                            \
1899  product(bool, CMSConcurrentMTEnabled, true,                               \
1900          "Whether multi-threaded concurrent work enabled "                 \
1901          "(effective only if ParNewGC)")                                   \
1902                                                                            \
1903  product(bool, CMSPrecleaningEnabled, true,                                \
1904          "Whether concurrent precleaning enabled")                         \
1905                                                                            \
1906  product(uintx, CMSPrecleanIter, 3,                                        \
1907          "Maximum number of precleaning iteration passes")                 \
1908          range(0, 9)                                                       \
1909                                                                            \
1910  product(uintx, CMSPrecleanDenominator, 3,                                 \
1911          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
1912          "ratio")                                                          \
1913          range(1, max_uintx)                                               \
1914          constraint(CMSPrecleanDenominatorConstraintFunc,AfterErgo)        \
1915                                                                            \
1916  product(uintx, CMSPrecleanNumerator, 2,                                   \
1917          "CMSPrecleanNumerator:CMSPrecleanDenominator yields convergence " \
1918          "ratio")                                                          \
1919          range(0, max_uintx-1)                                             \
1920          constraint(CMSPrecleanNumeratorConstraintFunc,AfterErgo)          \
1921                                                                            \
1922  product(bool, CMSPrecleanRefLists1, true,                                 \
1923          "Preclean ref lists during (initial) preclean phase")             \
1924                                                                            \
1925  product(bool, CMSPrecleanRefLists2, false,                                \
1926          "Preclean ref lists during abortable preclean phase")             \
1927                                                                            \
1928  product(bool, CMSPrecleanSurvivors1, false,                               \
1929          "Preclean survivors during (initial) preclean phase")             \
1930                                                                            \
1931  product(bool, CMSPrecleanSurvivors2, true,                                \
1932          "Preclean survivors during abortable preclean phase")             \
1933                                                                            \
1934  product(uintx, CMSPrecleanThreshold, 1000,                                \
1935          "Do not iterate again if number of dirty cards is less than this")\
1936          range(100, max_uintx)                                             \
1937                                                                            \
1938  product(bool, CMSCleanOnEnter, true,                                      \
1939          "Clean-on-enter optimization for reducing number of dirty cards") \
1940                                                                            \
1941  product(uintx, CMSRemarkVerifyVariant, 1,                                 \
1942          "Choose variant (1,2) of verification following remark")          \
1943          range(1, 2)                                                       \
1944                                                                            \
1945  product(size_t, CMSScheduleRemarkEdenSizeThreshold, 2*M,                  \
1946          "If Eden size is below this, do not try to schedule remark")      \
1947                                                                            \
1948  product(uintx, CMSScheduleRemarkEdenPenetration, 50,                      \
1949          "The Eden occupancy percentage (0-100) at which "                 \
1950          "to try and schedule remark pause")                               \
1951          range(0, 100)                                                     \
1952                                                                            \
1953  product(uintx, CMSScheduleRemarkSamplingRatio, 5,                         \
1954          "Start sampling eden top at least before young gen "              \
1955          "occupancy reaches 1/<ratio> of the size at which "               \
1956          "we plan to schedule remark")                                     \
1957          range(1, max_uintx)                                               \
1958                                                                            \
1959  product(uintx, CMSSamplingGrain, 16*K,                                    \
1960          "The minimum distance between eden samples for CMS (see above)")  \
1961          range(1, max_uintx)                                               \
1962                                                                            \
1963  product(bool, CMSScavengeBeforeRemark, false,                             \
1964          "Attempt scavenge before the CMS remark step")                    \
1965                                                                            \
1966  develop(bool, CMSTraceSweeper, false,                                     \
1967          "Trace some actions of the CMS sweeper")                          \
1968                                                                            \
1969  product(uintx, CMSWorkQueueDrainThreshold, 10,                            \
1970          "Don't drain below this size per parallel worker/thief")          \
1971          range(1, max_juint)                                               \
1972          constraint(CMSWorkQueueDrainThresholdConstraintFunc,AfterErgo)    \
1973                                                                            \
1974  manageable(intx, CMSWaitDuration, 2000,                                   \
1975          "Time in milliseconds that CMS thread waits for young GC")        \
1976                                                                            \
1977  develop(uintx, CMSCheckInterval, 1000,                                    \
1978          "Interval in milliseconds that CMS thread checks if it "          \
1979          "should start a collection cycle")                                \
1980                                                                            \
1981  product(bool, CMSYield, true,                                             \
1982          "Yield between steps of CMS")                                     \
1983                                                                            \
1984  product(size_t, CMSBitMapYieldQuantum, 10*M,                              \
1985          "Bitmap operations should process at most this many bits "        \
1986          "between yields")                                                 \
1987          range(1, max_uintx)                                               \
1988                                                                            \
1989  product(bool, CMSDumpAtPromotionFailure, false,                           \
1990          "Dump useful information about the state of the CMS old "         \
1991          "generation upon a promotion failure")                            \
1992                                                                            \
1993  product(bool, CMSPrintChunksInDump, false,                                \
1994          "In a dump enabled by CMSDumpAtPromotionFailure, include "        \
1995          "more detailed information about the free chunks")                \
1996                                                                            \
1997  product(bool, CMSPrintObjectsInDump, false,                               \
1998          "In a dump enabled by CMSDumpAtPromotionFailure, include "        \
1999          "more detailed information about the allocated objects")          \
2000                                                                            \
2001  diagnostic(bool, FLSVerifyAllHeapReferences, false,                       \
2002          "Verify that all references across the FLS boundary "             \
2003          "are to valid objects")                                           \
2004                                                                            \
2005  diagnostic(bool, FLSVerifyLists, false,                                   \
2006          "Do lots of (expensive) FreeListSpace verification")              \
2007                                                                            \
2008  diagnostic(bool, FLSVerifyIndexTable, false,                              \
2009          "Do lots of (expensive) FLS index table verification")            \
2010                                                                            \
2011  develop(bool, FLSVerifyDictionary, false,                                 \
2012          "Do lots of (expensive) FLS dictionary verification")             \
2013                                                                            \
2014  develop(bool, VerifyBlockOffsetArray, false,                              \
2015          "Do (expensive) block offset array verification")                 \
2016                                                                            \
2017  diagnostic(bool, BlockOffsetArrayUseUnallocatedBlock, false,              \
2018          "Maintain _unallocated_block in BlockOffsetArray "                \
2019          "(currently applicable only to CMS collector)")                   \
2020                                                                            \
2021  develop(bool, TraceCMSState, false,                                       \
2022          "Trace the state of the CMS collection")                          \
2023                                                                            \
2024  product(intx, RefDiscoveryPolicy, 0,                                      \
2025          "Select type of reference discovery policy: "                     \
2026          "reference-based(0) or referent-based(1)")                        \
2027          range(ReferenceProcessor::DiscoveryPolicyMin,                     \
2028                ReferenceProcessor::DiscoveryPolicyMax)                     \
2029                                                                            \
2030  product(bool, ParallelRefProcEnabled, false,                              \
2031          "Enable parallel reference processing whenever possible")         \
2032                                                                            \
2033  product(bool, ParallelRefProcBalancingEnabled, true,                      \
2034          "Enable balancing of reference processing queues")                \
2035                                                                            \
2036  product(uintx, CMSTriggerRatio, 80,                                       \
2037          "Percentage of MinHeapFreeRatio in CMS generation that is "       \
2038          "allocated before a CMS collection cycle commences")              \
2039          range(0, 100)                                                     \
2040                                                                            \
2041  product(uintx, CMSBootstrapOccupancy, 50,                                 \
2042          "Percentage CMS generation occupancy at which to "                \
2043          "initiate CMS collection for bootstrapping collection stats")     \
2044          range(0, 100)                                                     \
2045                                                                            \
2046  product(intx, CMSInitiatingOccupancyFraction, -1,                         \
2047          "Percentage CMS generation occupancy to start a CMS collection "  \
2048          "cycle. A negative value means that CMSTriggerRatio is used")     \
2049          range(min_intx, 100)                                              \
2050                                                                            \
2051  product(uintx, InitiatingHeapOccupancyPercent, 45,                        \
2052          "Percentage of the (entire) heap occupancy to start a "           \
2053          "concurrent GC cycle. It is used by GCs that trigger a "          \
2054          "concurrent GC cycle based on the occupancy of the entire heap, " \
2055          "not just one of the generations (e.g., G1). A value of 0 "       \
2056          "denotes 'do constant GC cycles'.")                               \
2057          range(0, 100)                                                     \
2058                                                                            \
2059  manageable(intx, CMSTriggerInterval, -1,                                  \
2060          "Commence a CMS collection cycle (at least) every so many "       \
2061          "milliseconds (0 permanently, -1 disabled)")                      \
2062          range(-1, max_intx)                                               \
2063                                                                            \
2064  product(bool, UseCMSInitiatingOccupancyOnly, false,                       \
2065          "Only use occupancy as a criterion for starting a CMS collection")\
2066                                                                            \
2067  product(uintx, CMSIsTooFullPercentage, 98,                                \
2068          "An absolute ceiling above which CMS will always consider the "   \
2069          "unloading of classes when class unloading is enabled")           \
2070          range(0, 100)                                                     \
2071                                                                            \
2072  develop(bool, CMSTestInFreeList, false,                                   \
2073          "Check if the coalesced range is already in the "                 \
2074          "free lists as claimed")                                          \
2075                                                                            \
2076  notproduct(bool, CMSVerifyReturnedBytes, false,                           \
2077          "Check that all the garbage collected was returned to the "       \
2078          "free lists")                                                     \
2079                                                                            \
2080  notproduct(bool, ScavengeALot, false,                                     \
2081          "Force scavenge at every Nth exit from the runtime system "       \
2082          "(N=ScavengeALotInterval)")                                       \
2083                                                                            \
2084  develop(bool, FullGCALot, false,                                          \
2085          "Force full gc at every Nth exit from the runtime system "        \
2086          "(N=FullGCALotInterval)")                                         \
2087                                                                            \
2088  notproduct(bool, GCALotAtAllSafepoints, false,                            \
2089          "Enforce ScavengeALot/GCALot at all potential safepoints")        \
2090                                                                            \
2091  product(bool, PrintPromotionFailure, false,                               \
2092          "Print additional diagnostic information following "              \
2093          "promotion failure")                                              \
2094                                                                            \
2095  notproduct(bool, PromotionFailureALot, false,                             \
2096          "Use promotion failure handling on every youngest generation "    \
2097          "collection")                                                     \
2098                                                                            \
2099  develop(uintx, PromotionFailureALotCount, 1000,                           \
2100          "Number of promotion failures occurring at PLAB "                 \
2101          "refill attempts (ParNew) or promotion attempts "                 \
2102          "(other young collectors)")                                       \
2103                                                                            \
2104  develop(uintx, PromotionFailureALotInterval, 5,                           \
2105          "Total collections between promotion failures a lot")             \
2106                                                                            \
2107  experimental(uintx, WorkStealingSleepMillis, 1,                           \
2108          "Sleep time when sleep is used for yields")                       \
2109                                                                            \
2110  experimental(uintx, WorkStealingYieldsBeforeSleep, 5000,                  \
2111          "Number of yields before a sleep is done during work stealing")   \
2112                                                                            \
2113  experimental(uintx, WorkStealingHardSpins, 4096,                          \
2114          "Number of iterations in a spin loop between checks on "          \
2115          "time out of hard spin")                                          \
2116                                                                            \
2117  experimental(uintx, WorkStealingSpinToYieldRatio, 10,                     \
2118          "Ratio of hard spins to calls to yield")                          \
2119                                                                            \
2120  develop(uintx, ObjArrayMarkingStride, 512,                                \
2121          "Number of object array elements to push onto the marking stack " \
2122          "before pushing a continuation entry")                            \
2123                                                                            \
2124  develop(bool, MetadataAllocationFailALot, false,                          \
2125          "Fail metadata allocations at intervals controlled by "           \
2126          "MetadataAllocationFailALotInterval")                             \
2127                                                                            \
2128  develop(uintx, MetadataAllocationFailALotInterval, 1000,                  \
2129          "Metadata allocation failure a lot interval")                     \
2130                                                                            \
2131  develop(bool, TraceMetadataChunkAllocation, false,                        \
2132          "Trace chunk metadata allocations")                               \
2133                                                                            \
2134  product(bool, TraceMetadataHumongousAllocation, false,                    \
2135          "Trace humongous metadata allocations")                           \
2136                                                                            \
2137  develop(bool, TraceMetavirtualspaceAllocation, false,                     \
2138          "Trace virtual space metadata allocations")                       \
2139                                                                            \
2140  notproduct(bool, ExecuteInternalVMTests, false,                           \
2141          "Enable execution of internal VM tests")                          \
2142                                                                            \
2143  notproduct(bool, VerboseInternalVMTests, false,                           \
2144          "Turn on logging for internal VM tests.")                         \
2145                                                                            \
2146  product_pd(bool, UseTLAB, "Use thread-local object allocation")           \
2147                                                                            \
2148  product_pd(bool, ResizeTLAB,                                              \
2149          "Dynamically resize TLAB size for threads")                       \
2150                                                                            \
2151  product(bool, ZeroTLAB, false,                                            \
2152          "Zero out the newly created TLAB")                                \
2153                                                                            \
2154  product(bool, FastTLABRefill, true,                                       \
2155          "Use fast TLAB refill code")                                      \
2156                                                                            \
2157  product(bool, PrintTLAB, false,                                           \
2158          "Print various TLAB related information")                         \
2159                                                                            \
2160  product(bool, TLABStats, true,                                            \
2161          "Provide more detailed and expensive TLAB statistics "            \
2162          "(with PrintTLAB)")                                               \
2163                                                                            \
2164  product_pd(bool, NeverActAsServerClassMachine,                            \
2165          "Never act like a server-class machine")                          \
2166                                                                            \
2167  product(bool, AlwaysActAsServerClassMachine, false,                       \
2168          "Always act like a server-class machine")                         \
2169                                                                            \
2170  product_pd(uint64_t, MaxRAM,                                              \
2171          "Real memory size (in bytes) used to set maximum heap size")      \
2172                                                                            \
2173  product(size_t, ErgoHeapSizeLimit, 0,                                     \
2174          "Maximum ergonomically set heap size (in bytes); zero means use " \
2175          "MaxRAM / MaxRAMFraction")                                        \
2176                                                                            \
2177  product(uintx, MaxRAMFraction, 4,                                         \
2178          "Maximum fraction (1/n) of real memory used for maximum heap "    \
2179          "size")                                                           \
2180          range(1, max_uintx)                                               \
2181                                                                            \
2182  product(uintx, MinRAMFraction, 2,                                         \
2183          "Minimum fraction (1/n) of real memory used for maximum heap "    \
2184          "size on systems with small physical memory size")                \
2185          range(1, max_uintx)                                               \
2186                                                                            \
2187  product(uintx, InitialRAMFraction, 64,                                    \
2188          "Fraction (1/n) of real memory used for initial heap size")       \
2189          range(1, max_uintx)                                               \
2190                                                                            \
2191  develop(uintx, MaxVirtMemFraction, 2,                                     \
2192          "Maximum fraction (1/n) of virtual memory used for ergonomically "\
2193          "determining maximum heap size")                                  \
2194                                                                            \
2195  product(bool, UseAutoGCSelectPolicy, false,                               \
2196          "Use automatic collection selection policy")                      \
2197                                                                            \
2198  product(uintx, AutoGCSelectPauseMillis, 5000,                             \
2199          "Automatic GC selection pause threshold in milliseconds")         \
2200                                                                            \
2201  product(bool, UseAdaptiveSizePolicy, true,                                \
2202          "Use adaptive generation sizing policies")                        \
2203                                                                            \
2204  product(bool, UsePSAdaptiveSurvivorSizePolicy, true,                      \
2205          "Use adaptive survivor sizing policies")                          \
2206                                                                            \
2207  product(bool, UseAdaptiveGenerationSizePolicyAtMinorCollection, true,     \
2208          "Use adaptive young-old sizing policies at minor collections")    \
2209                                                                            \
2210  product(bool, UseAdaptiveGenerationSizePolicyAtMajorCollection, true,     \
2211          "Use adaptive young-old sizing policies at major collections")    \
2212                                                                            \
2213  product(bool, UseAdaptiveSizePolicyWithSystemGC, false,                   \
2214          "Include statistics from System.gc() for adaptive size policy")   \
2215                                                                            \
2216  product(bool, UseAdaptiveGCBoundary, false,                               \
2217          "Allow young-old boundary to move")                               \
2218                                                                            \
2219  develop(bool, TraceAdaptiveGCBoundary, false,                             \
2220          "Trace young-old boundary moves")                                 \
2221                                                                            \
2222  develop(intx, PSAdaptiveSizePolicyResizeVirtualSpaceAlot, -1,             \
2223          "Resize the virtual spaces of the young or old generations")      \
2224          range(-1, 1)                                                      \
2225                                                                            \
2226  product(uintx, AdaptiveSizeThroughPutPolicy, 0,                           \
2227          "Policy for changing generation size for throughput goals")       \
2228          range(0, 1)                                                       \
2229                                                                            \
2230  develop(bool, PSAdjustTenuredGenForMinorPause, false,                     \
2231          "Adjust tenured generation to achieve a minor pause goal")        \
2232                                                                            \
2233  develop(bool, PSAdjustYoungGenForMajorPause, false,                       \
2234          "Adjust young generation to achieve a major pause goal")          \
2235                                                                            \
2236  product(uintx, AdaptiveSizePolicyInitializingSteps, 20,                   \
2237          "Number of steps where heuristics is used before data is used")   \
2238                                                                            \
2239  develop(uintx, AdaptiveSizePolicyReadyThreshold, 5,                       \
2240          "Number of collections before the adaptive sizing is started")    \
2241                                                                            \
2242  product(uintx, AdaptiveSizePolicyOutputInterval, 0,                       \
2243          "Collection interval for printing information; zero means never") \
2244                                                                            \
2245  product(bool, UseAdaptiveSizePolicyFootprintGoal, true,                   \
2246          "Use adaptive minimum footprint as a goal")                       \
2247                                                                            \
2248  product(uintx, AdaptiveSizePolicyWeight, 10,                              \
2249          "Weight given to exponential resizing, between 0 and 100")        \
2250          range(0, 100)                                                     \
2251                                                                            \
2252  product(uintx, AdaptiveTimeWeight,       25,                              \
2253          "Weight given to time in adaptive policy, between 0 and 100")     \
2254          range(0, 100)                                                     \
2255                                                                            \
2256  product(uintx, PausePadding, 1,                                           \
2257          "How much buffer to keep for pause time")                         \
2258                                                                            \
2259  product(uintx, PromotedPadding, 3,                                        \
2260          "How much buffer to keep for promotion failure")                  \
2261                                                                            \
2262  product(uintx, SurvivorPadding, 3,                                        \
2263          "How much buffer to keep for survivor overflow")                  \
2264                                                                            \
2265  product(uintx, ThresholdTolerance, 10,                                    \
2266          "Allowed collection cost difference between generations")         \
2267          range(0, 100)                                                     \
2268                                                                            \
2269  product(uintx, AdaptiveSizePolicyCollectionCostMargin, 50,                \
2270          "If collection costs are within margin, reduce both by full "     \
2271          "delta")                                                          \
2272                                                                            \
2273  product(uintx, YoungGenerationSizeIncrement, 20,                          \
2274          "Adaptive size percentage change in young generation")            \
2275          range(0, 100)                                                     \
2276                                                                            \
2277  product(uintx, YoungGenerationSizeSupplement, 80,                         \
2278          "Supplement to YoungedGenerationSizeIncrement used at startup")   \
2279          range(0, 100)                                                     \
2280                                                                            \
2281  product(uintx, YoungGenerationSizeSupplementDecay, 8,                     \
2282          "Decay factor to YoungedGenerationSizeSupplement")                \
2283          range(1, max_uintx)                                               \
2284                                                                            \
2285  product(uintx, TenuredGenerationSizeIncrement, 20,                        \
2286          "Adaptive size percentage change in tenured generation")          \
2287          range(0, 100)                                                     \
2288                                                                            \
2289  product(uintx, TenuredGenerationSizeSupplement, 80,                       \
2290          "Supplement to TenuredGenerationSizeIncrement used at startup")   \
2291          range(0, 100)                                                     \
2292                                                                            \
2293  product(uintx, TenuredGenerationSizeSupplementDecay, 2,                   \
2294          "Decay factor to TenuredGenerationSizeIncrement")                 \
2295          range(1, max_uintx)                                               \
2296                                                                            \
2297  product(uintx, MaxGCPauseMillis, max_uintx,                               \
2298          "Adaptive size policy maximum GC pause time goal in millisecond, "\
2299          "or (G1 Only) the maximum GC time per MMU time slice")            \
2300          range(1, max_uintx)                                               \
2301          constraint(MaxGCPauseMillisConstraintFunc,AfterMemoryInit)        \
2302                                                                            \
2303  product(uintx, GCPauseIntervalMillis, 0,                                  \
2304          "Time slice for MMU specification")                               \
2305          constraint(GCPauseIntervalMillisConstraintFunc,AfterMemoryInit)   \
2306                                                                            \
2307  product(uintx, MaxGCMinorPauseMillis, max_uintx,                          \
2308          "Adaptive size policy maximum GC minor pause time goal "          \
2309          "in millisecond")                                                 \
2310                                                                            \
2311  product(uintx, GCTimeRatio, 99,                                           \
2312          "Adaptive size policy application time to GC time ratio")         \
2313                                                                            \
2314  product(uintx, AdaptiveSizeDecrementScaleFactor, 4,                       \
2315          "Adaptive size scale down factor for shrinking")                  \
2316          range(1, max_uintx)                                               \
2317                                                                            \
2318  product(bool, UseAdaptiveSizeDecayMajorGCCost, true,                      \
2319          "Adaptive size decays the major cost for long major intervals")   \
2320                                                                            \
2321  product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10,                     \
2322          "Time scale over which major costs decay")                        \
2323                                                                            \
2324  product(uintx, MinSurvivorRatio, 3,                                       \
2325          "Minimum ratio of young generation/survivor space size")          \
2326          range(3, max_uintx)                                               \
2327                                                                            \
2328  product(uintx, InitialSurvivorRatio, 8,                                   \
2329          "Initial ratio of young generation/survivor space size")          \
2330                                                                            \
2331  product(size_t, BaseFootPrintEstimate, 256*M,                             \
2332          "Estimate of footprint other than Java Heap")                     \
2333                                                                            \
2334  product(bool, UseGCOverheadLimit, true,                                   \
2335          "Use policy to limit of proportion of time spent in GC "          \
2336          "before an OutOfMemory error is thrown")                          \
2337                                                                            \
2338  product(uintx, GCTimeLimit, 98,                                           \
2339          "Limit of the proportion of time spent in GC before "             \
2340          "an OutOfMemoryError is thrown (used with GCHeapFreeLimit)")      \
2341          range(0, 100)                                                     \
2342                                                                            \
2343  product(uintx, GCHeapFreeLimit, 2,                                        \
2344          "Minimum percentage of free space after a full GC before an "     \
2345          "OutOfMemoryError is thrown (used with GCTimeLimit)")             \
2346          range(0, 100)                                                     \
2347                                                                            \
2348  develop(uintx, AdaptiveSizePolicyGCTimeLimitThreshold, 5,                 \
2349          "Number of consecutive collections before gc time limit fires")   \
2350          range(1, max_uintx)                                               \
2351                                                                            \
2352  product(bool, PrintAdaptiveSizePolicy, false,                             \
2353          "Print information about AdaptiveSizePolicy")                     \
2354                                                                            \
2355  product(intx, PrefetchCopyIntervalInBytes, -1,                            \
2356          "How far ahead to prefetch destination area (<= 0 means off)")    \
2357                                                                            \
2358  product(intx, PrefetchScanIntervalInBytes, -1,                            \
2359          "How far ahead to prefetch scan area (<= 0 means off)")           \
2360                                                                            \
2361  product(intx, PrefetchFieldsAhead, -1,                                    \
2362          "How many fields ahead to prefetch in oop scan (<= 0 means off)") \
2363                                                                            \
2364  diagnostic(bool, VerifySilently, false,                                   \
2365          "Do not print the verification progress")                         \
2366                                                                            \
2367  diagnostic(bool, VerifyDuringStartup, false,                              \
2368          "Verify memory system before executing any Java code "            \
2369          "during VM initialization")                                       \
2370                                                                            \
2371  diagnostic(bool, VerifyBeforeExit, trueInDebug,                           \
2372          "Verify system before exiting")                                   \
2373                                                                            \
2374  diagnostic(bool, VerifyBeforeGC, false,                                   \
2375          "Verify memory system before GC")                                 \
2376                                                                            \
2377  diagnostic(bool, VerifyAfterGC, false,                                    \
2378          "Verify memory system after GC")                                  \
2379                                                                            \
2380  diagnostic(bool, VerifyDuringGC, false,                                   \
2381          "Verify memory system during GC (between phases)")                \
2382                                                                            \
2383  diagnostic(bool, GCParallelVerificationEnabled, true,                     \
2384          "Enable parallel memory system verification")                     \
2385                                                                            \
2386  diagnostic(bool, DeferInitialCardMark, false,                             \
2387          "When +ReduceInitialCardMarks, explicitly defer any that "        \
2388          "may arise from new_pre_store_barrier")                           \
2389                                                                            \
2390  product(bool, UseCondCardMark, false,                                     \
2391          "Check for already marked card before updating card table")       \
2392                                                                            \
2393  diagnostic(bool, VerifyRememberedSets, false,                             \
2394          "Verify GC remembered sets")                                      \
2395                                                                            \
2396  diagnostic(bool, VerifyObjectStartArray, true,                            \
2397          "Verify GC object start array if verify before/after")            \
2398                                                                            \
2399  product(bool, DisableExplicitGC, false,                                   \
2400          "Ignore calls to System.gc()")                                    \
2401                                                                            \
2402  notproduct(bool, CheckMemoryInitialization, false,                        \
2403          "Check memory initialization")                                    \
2404                                                                            \
2405  diagnostic(bool, BindCMSThreadToCPU, false,                               \
2406          "Bind CMS Thread to CPU if possible")                             \
2407                                                                            \
2408  diagnostic(uintx, CPUForCMSThread, 0,                                     \
2409          "When BindCMSThreadToCPU is true, the CPU to bind CMS thread to") \
2410                                                                            \
2411  product(bool, BindGCTaskThreadsToCPUs, false,                             \
2412          "Bind GCTaskThreads to CPUs if possible")                         \
2413                                                                            \
2414  product(bool, UseGCTaskAffinity, false,                                   \
2415          "Use worker affinity when asking for GCTasks")                    \
2416                                                                            \
2417  product(uintx, ProcessDistributionStride, 4,                              \
2418          "Stride through processors when distributing processes")          \
2419                                                                            \
2420  product(uintx, CMSCoordinatorYieldSleepCount, 10,                         \
2421          "Number of times the coordinator GC thread will sleep while "     \
2422          "yielding before giving up and resuming GC")                      \
2423                                                                            \
2424  product(uintx, CMSYieldSleepCount, 0,                                     \
2425          "Number of times a GC thread (minus the coordinator) "            \
2426          "will sleep while yielding before giving up and resuming GC")     \
2427                                                                            \
2428  /* gc tracing */                                                          \
2429  manageable(bool, PrintGC, false,                                          \
2430          "Print message at garbage collection")                            \
2431                                                                            \
2432  manageable(bool, PrintGCDetails, false,                                   \
2433          "Print more details at garbage collection")                       \
2434                                                                            \
2435  manageable(bool, PrintGCDateStamps, false,                                \
2436          "Print date stamps at garbage collection")                        \
2437                                                                            \
2438  manageable(bool, PrintGCTimeStamps, false,                                \
2439          "Print timestamps at garbage collection")                         \
2440                                                                            \
2441  manageable(bool, PrintGCID, true,                                         \
2442          "Print an identifier for each garbage collection")                \
2443                                                                            \
2444  product(bool, PrintGCTaskTimeStamps, false,                               \
2445          "Print timestamps for individual gc worker thread tasks")         \
2446                                                                            \
2447  develop(intx, ConcGCYieldTimeout, 0,                                      \
2448          "If non-zero, assert that GC threads yield within this "          \
2449          "number of milliseconds")                                         \
2450          range(0, max_intx)                                                \
2451                                                                            \
2452  product(bool, PrintReferenceGC, false,                                    \
2453          "Print times spent handling reference objects during GC "         \
2454          "(enabled only when PrintGCDetails)")                             \
2455                                                                            \
2456  develop(bool, TraceReferenceGC, false,                                    \
2457          "Trace handling of soft/weak/final/phantom references")           \
2458                                                                            \
2459  develop(bool, TraceFinalizerRegistration, false,                          \
2460          "Trace registration of final references")                         \
2461                                                                            \
2462  notproduct(bool, TraceScavenge, false,                                    \
2463          "Trace scavenge")                                                 \
2464                                                                            \
2465  product(bool, IgnoreEmptyClassPaths, false,                               \
2466          "Ignore empty path elements in -classpath")                       \
2467                                                                            \
2468  product(bool, TraceClassPaths, false,                                     \
2469          "Trace processing of class paths")                                \
2470                                                                            \
2471  product_rw(bool, TraceClassLoading, false,                                \
2472          "Trace all classes loaded")                                       \
2473                                                                            \
2474  product(bool, TraceClassLoadingPreorder, false,                           \
2475          "Trace all classes loaded in order referenced (not loaded)")      \
2476                                                                            \
2477  product_rw(bool, TraceClassUnloading, false,                              \
2478          "Trace unloading of classes")                                     \
2479                                                                            \
2480  product_rw(bool, TraceLoaderConstraints, false,                           \
2481          "Trace loader constraints")                                       \
2482                                                                            \
2483  develop(bool, TraceClassLoaderData, false,                                \
2484          "Trace class loader loader_data lifetime")                        \
2485                                                                            \
2486  product(size_t, InitialBootClassLoaderMetaspaceSize,                      \
2487          NOT_LP64(2200*K) LP64_ONLY(4*M),                                  \
2488          "Initial size of the boot class loader data metaspace")           \
2489          range(30*K, max_uintx/BytesPerWord)                               \
2490          constraint(InitialBootClassLoaderMetaspaceSizeConstraintFunc, AfterErgo)\
2491                                                                            \
2492  product(bool, TraceYoungGenTime, false,                                   \
2493          "Trace accumulated time for young collection")                    \
2494                                                                            \
2495  product(bool, TraceOldGenTime, false,                                     \
2496          "Trace accumulated time for old collection")                      \
2497                                                                            \
2498  product(bool, PrintTenuringDistribution, false,                           \
2499          "Print tenuring age information")                                 \
2500                                                                            \
2501  product_rw(bool, PrintHeapAtGC, false,                                    \
2502          "Print heap layout before and after each GC")                     \
2503                                                                            \
2504  product_rw(bool, PrintHeapAtGCExtended, false,                            \
2505          "Print extended information about the layout of the heap "        \
2506          "when -XX:+PrintHeapAtGC is set")                                 \
2507                                                                            \
2508  product(bool, PrintHeapAtSIGBREAK, true,                                  \
2509          "Print heap layout in response to SIGBREAK")                      \
2510                                                                            \
2511  manageable(bool, PrintClassHistogramBeforeFullGC, false,                  \
2512          "Print a class histogram before any major stop-world GC")         \
2513                                                                            \
2514  manageable(bool, PrintClassHistogramAfterFullGC, false,                   \
2515          "Print a class histogram after any major stop-world GC")          \
2516                                                                            \
2517  manageable(bool, PrintClassHistogram, false,                              \
2518          "Print a histogram of class instances")                           \
2519                                                                            \
2520  develop(bool, TraceWorkGang, false,                                       \
2521          "Trace activities of work gangs")                                 \
2522                                                                            \
2523  product(bool, TraceParallelOldGCTasks, false,                             \
2524          "Trace multithreaded GC activity")                                \
2525                                                                            \
2526  develop(bool, TraceBlockOffsetTable, false,                               \
2527          "Print BlockOffsetTable maps")                                    \
2528                                                                            \
2529  develop(bool, TraceCardTableModRefBS, false,                              \
2530          "Print CardTableModRefBS maps")                                   \
2531                                                                            \
2532  develop(bool, TraceGCTaskManager, false,                                  \
2533          "Trace actions of the GC task manager")                           \
2534                                                                            \
2535  develop(bool, TraceGCTaskQueue, false,                                    \
2536          "Trace actions of the GC task queues")                            \
2537                                                                            \
2538  diagnostic(bool, TraceGCTaskThread, false,                                \
2539          "Trace actions of the GC task threads")                           \
2540                                                                            \
2541  product(bool, PrintParallelOldGCPhaseTimes, false,                        \
2542          "Print the time taken by each phase in ParallelOldGC "            \
2543          "(PrintGCDetails must also be enabled)")                          \
2544                                                                            \
2545  develop(bool, TraceParallelOldGCMarkingPhase, false,                      \
2546          "Trace marking phase in ParallelOldGC")                           \
2547                                                                            \
2548  develop(bool, TraceParallelOldGCSummaryPhase, false,                      \
2549          "Trace summary phase in ParallelOldGC")                           \
2550                                                                            \
2551  develop(bool, TraceParallelOldGCCompactionPhase, false,                   \
2552          "Trace compaction phase in ParallelOldGC")                        \
2553                                                                            \
2554  develop(bool, TraceParallelOldGCDensePrefix, false,                       \
2555          "Trace dense prefix computation for ParallelOldGC")               \
2556                                                                            \
2557  develop(bool, IgnoreLibthreadGPFault, false,                              \
2558          "Suppress workaround for libthread GP fault")                     \
2559                                                                            \
2560  product(bool, PrintJNIGCStalls, false,                                    \
2561          "Print diagnostic message when GC is stalled "                    \
2562          "by JNI critical section")                                        \
2563                                                                            \
2564  experimental(double, ObjectCountCutOffPercent, 0.5,                       \
2565          "The percentage of the used heap that the instances of a class "  \
2566          "must occupy for the class to generate a trace event")            \
2567          range(0.0, 100.0)                                                 \
2568                                                                            \
2569  /* GC log rotation setting */                                             \
2570                                                                            \
2571  product(bool, UseGCLogFileRotation, false,                                \
2572          "Rotate gclog files (for long running applications). It requires "\
2573          "-Xloggc:<filename>")                                             \
2574                                                                            \
2575  product(uintx, NumberOfGCLogFiles, 0,                                     \
2576          "Number of gclog files in rotation "                              \
2577          "(default: 0, no rotation)")                                      \
2578                                                                            \
2579  product(size_t, GCLogFileSize, 8*K,                                       \
2580          "GC log file size, requires UseGCLogFileRotation. "               \
2581          "Set to 0 to only trigger rotation via jcmd")                     \
2582                                                                            \
2583  /* JVMTI heap profiling */                                                \
2584                                                                            \
2585  diagnostic(bool, TraceJVMTIObjectTagging, false,                          \
2586          "Trace JVMTI object tagging calls")                               \
2587                                                                            \
2588  diagnostic(bool, VerifyBeforeIteration, false,                            \
2589          "Verify memory system before JVMTI iteration")                    \
2590                                                                            \
2591  /* compiler interface */                                                  \
2592                                                                            \
2593  develop(bool, CIPrintCompilerName, false,                                 \
2594          "when CIPrint is active, print the name of the active compiler")  \
2595                                                                            \
2596  diagnostic(bool, CIPrintCompileQueue, false,                              \
2597          "display the contents of the compile queue whenever a "           \
2598          "compilation is enqueued")                                        \
2599                                                                            \
2600  develop(bool, CIPrintRequests, false,                                     \
2601          "display every request for compilation")                          \
2602                                                                            \
2603  product(bool, CITime, false,                                              \
2604          "collect timing information for compilation")                     \
2605                                                                            \
2606  develop(bool, CITimeVerbose, false,                                       \
2607          "be more verbose in compilation timings")                         \
2608                                                                            \
2609  develop(bool, CITimeEach, false,                                          \
2610          "display timing information after each successful compilation")   \
2611                                                                            \
2612  develop(bool, CICountOSR, false,                                          \
2613          "use a separate counter when assigning ids to osr compilations")  \
2614                                                                            \
2615  develop(bool, CICompileNatives, true,                                     \
2616          "compile native methods if supported by the compiler")            \
2617                                                                            \
2618  develop_pd(bool, CICompileOSR,                                            \
2619          "compile on stack replacement methods if supported by the "       \
2620          "compiler")                                                       \
2621                                                                            \
2622  develop(bool, CIPrintMethodCodes, false,                                  \
2623          "print method bytecodes of the compiled code")                    \
2624                                                                            \
2625  develop(bool, CIPrintTypeFlow, false,                                     \
2626          "print the results of ciTypeFlow analysis")                       \
2627                                                                            \
2628  develop(bool, CITraceTypeFlow, false,                                     \
2629          "detailed per-bytecode tracing of ciTypeFlow analysis")           \
2630                                                                            \
2631  develop(intx, OSROnlyBCI, -1,                                             \
2632          "OSR only at this bci.  Negative values mean exclude that bci")   \
2633                                                                            \
2634  /* compiler */                                                            \
2635                                                                            \
2636  /* notice: the max range value here is max_jint, not max_intx  */         \
2637  /* because of overflow issue                                   */         \
2638  product(intx, CICompilerCount, CI_COMPILER_COUNT,                         \
2639          "Number of compiler threads to run")                              \
2640          range(0, max_jint)                                                \
2641          constraint(CICompilerCountConstraintFunc, AtParse)                \
2642                                                                            \
2643  product(intx, CompilationPolicyChoice, 0,                                 \
2644          "which compilation policy (0-3)")                                 \
2645          range(0, 3)                                                       \
2646                                                                            \
2647  develop(bool, UseStackBanging, true,                                      \
2648          "use stack banging for stack overflow checks (required for "      \
2649          "proper StackOverflow handling; disable only to measure cost "    \
2650          "of stackbanging)")                                               \
2651                                                                            \
2652  develop(bool, UseStrictFP, true,                                          \
2653          "use strict fp if modifier strictfp is set")                      \
2654                                                                            \
2655  develop(bool, GenerateSynchronizationCode, true,                          \
2656          "generate locking/unlocking code for synchronized methods and "   \
2657          "monitors")                                                       \
2658                                                                            \
2659  develop(bool, GenerateCompilerNullChecks, true,                           \
2660          "Generate explicit null checks for loads/stores/calls")           \
2661                                                                            \
2662  develop(bool, GenerateRangeChecks, true,                                  \
2663          "Generate range checks for array accesses")                       \
2664                                                                            \
2665  develop_pd(bool, ImplicitNullChecks,                                      \
2666          "Generate code for implicit null checks")                         \
2667                                                                            \
2668  product_pd(bool, TrapBasedNullChecks,                                     \
2669          "Generate code for null checks that uses a cmp and trap "         \
2670          "instruction raising SIGTRAP.  This is only used if an access to" \
2671          "null (+offset) will not raise a SIGSEGV, i.e.,"                  \
2672          "ImplicitNullChecks don't work (PPC64).")                         \
2673                                                                            \
2674  product(bool, PrintSafepointStatistics, false,                            \
2675          "Print statistics about safepoint synchronization")               \
2676                                                                            \
2677  product(intx, PrintSafepointStatisticsCount, 300,                         \
2678          "Total number of safepoint statistics collected "                 \
2679          "before printing them out")                                       \
2680                                                                            \
2681  product(intx, PrintSafepointStatisticsTimeout,  -1,                       \
2682          "Print safepoint statistics only when safepoint takes "           \
2683          "more than PrintSafepointSatisticsTimeout in millis")             \
2684                                                                            \
2685  product(bool, TraceSafepointCleanupTime, false,                           \
2686          "Print the break down of clean up tasks performed during "        \
2687          "safepoint")                                                      \
2688                                                                            \
2689  product(bool, Inline, true,                                               \
2690          "Enable inlining")                                                \
2691                                                                            \
2692  product(bool, ClipInlining, true,                                         \
2693          "Clip inlining if aggregate method exceeds DesiredMethodLimit")   \
2694                                                                            \
2695  develop(bool, UseCHA, true,                                               \
2696          "Enable CHA")                                                     \
2697                                                                            \
2698  product(bool, UseTypeProfile, true,                                       \
2699          "Check interpreter profile for historically monomorphic calls")   \
2700                                                                            \
2701  diagnostic(bool, PrintInlining, false,                                    \
2702          "Print inlining optimizations")                                   \
2703                                                                            \
2704  product(bool, UsePopCountInstruction, false,                              \
2705          "Use population count instruction")                               \
2706                                                                            \
2707  develop(bool, EagerInitialization, false,                                 \
2708          "Eagerly initialize classes if possible")                         \
2709                                                                            \
2710  diagnostic(bool, LogTouchedMethods, false,                                \
2711          "Log methods which have been ever touched in runtime")            \
2712                                                                            \
2713  diagnostic(bool, PrintTouchedMethodsAtExit, false,                        \
2714          "Print all methods that have been ever touched in runtime")       \
2715                                                                            \
2716  develop(bool, TraceMethodReplacement, false,                              \
2717          "Print when methods are replaced do to recompilation")            \
2718                                                                            \
2719  develop(bool, PrintMethodFlushing, false,                                 \
2720          "Print the nmethods being flushed")                               \
2721                                                                            \
2722  diagnostic(bool, PrintMethodFlushingStatistics, false,                    \
2723          "print statistics about method flushing")                         \
2724                                                                            \
2725  diagnostic(intx, HotMethodDetectionLimit, 100000,                         \
2726          "Number of compiled code invocations after which "                \
2727          "the method is considered as hot by the flusher")                 \
2728                                                                            \
2729  diagnostic(intx, MinPassesBeforeFlush, 10,                                \
2730          "Minimum number of sweeper passes before an nmethod "             \
2731          "can be flushed")                                                 \
2732                                                                            \
2733  product(bool, UseCodeAging, true,                                         \
2734          "Insert counter to detect warm methods")                          \
2735                                                                            \
2736  diagnostic(bool, StressCodeAging, false,                                  \
2737          "Start with counters compiled in")                                \
2738                                                                            \
2739  develop(bool, UseRelocIndex, false,                                       \
2740          "Use an index to speed random access to relocations")             \
2741                                                                            \
2742  develop(bool, StressCodeBuffers, false,                                   \
2743          "Exercise code buffer expansion and other rare state changes")    \
2744                                                                            \
2745  diagnostic(bool, DebugNonSafepoints, trueInDebug,                         \
2746          "Generate extra debugging information for non-safepoints in "     \
2747          "nmethods")                                                       \
2748                                                                            \
2749  product(bool, PrintVMOptions, false,                                      \
2750          "Print flags that appeared on the command line")                  \
2751                                                                            \
2752  product(bool, IgnoreUnrecognizedVMOptions, false,                         \
2753          "Ignore unrecognized VM options")                                 \
2754                                                                            \
2755  product(bool, PrintCommandLineFlags, false,                               \
2756          "Print flags specified on command line or set by ergonomics")     \
2757                                                                            \
2758  product(bool, PrintFlagsInitial, false,                                   \
2759          "Print all VM flags before argument processing and exit VM")      \
2760                                                                            \
2761  product(bool, PrintFlagsFinal, false,                                     \
2762          "Print all VM flags after argument and ergonomic processing")     \
2763                                                                            \
2764  notproduct(bool, PrintFlagsWithComments, false,                           \
2765          "Print all VM flags with default values and descriptions and "    \
2766          "exit")                                                           \
2767                                                                            \
2768  product(bool, PrintFlagsRanges, false,                                    \
2769          "Print VM flags and their ranges and exit VM")                    \
2770                                                                            \
2771  diagnostic(bool, SerializeVMOutput, true,                                 \
2772          "Use a mutex to serialize output to tty and LogFile")             \
2773                                                                            \
2774  diagnostic(bool, DisplayVMOutput, true,                                   \
2775          "Display all VM output on the tty, independently of LogVMOutput") \
2776                                                                            \
2777  diagnostic(bool, LogVMOutput, false,                                      \
2778          "Save VM output to LogFile")                                      \
2779                                                                            \
2780  diagnostic(ccstr, LogFile, NULL,                                          \
2781          "If LogVMOutput or LogCompilation is on, save VM output to "      \
2782          "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)")\
2783                                                                            \
2784  product(ccstr, ErrorFile, NULL,                                           \
2785          "If an error occurs, save the error data to this file "           \
2786          "[default: ./hs_err_pid%p.log] (%p replaced with pid)")           \
2787                                                                            \
2788  product(bool, DisplayVMOutputToStderr, false,                             \
2789          "If DisplayVMOutput is true, display all VM output to stderr")    \
2790                                                                            \
2791  product(bool, DisplayVMOutputToStdout, false,                             \
2792          "If DisplayVMOutput is true, display all VM output to stdout")    \
2793                                                                            \
2794  product(bool, UseHeavyMonitors, false,                                    \
2795          "use heavyweight instead of lightweight Java monitors")           \
2796                                                                            \
2797  product(bool, PrintStringTableStatistics, false,                          \
2798          "print statistics about the StringTable and SymbolTable")         \
2799                                                                            \
2800  diagnostic(bool, VerifyStringTableAtExit, false,                          \
2801          "verify StringTable contents at exit")                            \
2802                                                                            \
2803  notproduct(bool, PrintSymbolTableSizeHistogram, false,                    \
2804          "print histogram of the symbol table")                            \
2805                                                                            \
2806  notproduct(bool, ExitVMOnVerifyError, false,                              \
2807          "standard exit from VM if bytecode verify error "                 \
2808          "(only in debug mode)")                                           \
2809                                                                            \
2810  notproduct(ccstr, AbortVMOnException, NULL,                               \
2811          "Call fatal if this exception is thrown.  Example: "              \
2812          "java -XX:AbortVMOnException=java.lang.NullPointerException Foo") \
2813                                                                            \
2814  notproduct(ccstr, AbortVMOnExceptionMessage, NULL,                        \
2815          "Call fatal if the exception pointed by AbortVMOnException "      \
2816          "has this message")                                               \
2817                                                                            \
2818  develop(bool, DebugVtables, false,                                        \
2819          "add debugging code to vtable dispatch")                          \
2820                                                                            \
2821  develop(bool, PrintVtables, false,                                        \
2822          "print vtables when printing klass")                              \
2823                                                                            \
2824  notproduct(bool, PrintVtableStats, false,                                 \
2825          "print vtables stats at end of run")                              \
2826                                                                            \
2827  develop(bool, TraceCreateZombies, false,                                  \
2828          "trace creation of zombie nmethods")                              \
2829                                                                            \
2830  notproduct(bool, IgnoreLockingAssertions, false,                          \
2831          "disable locking assertions (for speed)")                         \
2832                                                                            \
2833  product(bool, RangeCheckElimination, true,                                \
2834          "Eliminate range checks")                                         \
2835                                                                            \
2836  develop_pd(bool, UncommonNullCast,                                        \
2837          "track occurrences of null in casts; adjust compiler tactics")    \
2838                                                                            \
2839  develop(bool, TypeProfileCasts,  true,                                    \
2840          "treat casts like calls for purposes of type profiling")          \
2841                                                                            \
2842  develop(bool, DelayCompilationDuringStartup, true,                        \
2843          "Delay invoking the compiler until main application class is "    \
2844          "loaded")                                                         \
2845                                                                            \
2846  develop(bool, CompileTheWorld, false,                                     \
2847          "Compile all methods in all classes in bootstrap class path "     \
2848          "(stress test)")                                                  \
2849                                                                            \
2850  develop(bool, CompileTheWorldPreloadClasses, true,                        \
2851          "Preload all classes used by a class before start loading")       \
2852                                                                            \
2853  notproduct(intx, CompileTheWorldSafepointInterval, 100,                   \
2854          "Force a safepoint every n compiles so sweeper can keep up")      \
2855                                                                            \
2856  develop(bool, FillDelaySlots, true,                                       \
2857          "Fill delay slots (on SPARC only)")                               \
2858                                                                            \
2859  develop(bool, TimeLivenessAnalysis, false,                                \
2860          "Time computation of bytecode liveness analysis")                 \
2861                                                                            \
2862  develop(bool, TraceLivenessGen, false,                                    \
2863          "Trace the generation of liveness analysis information")          \
2864                                                                            \
2865  notproduct(bool, TraceLivenessQuery, false,                               \
2866          "Trace queries of liveness analysis information")                 \
2867                                                                            \
2868  notproduct(bool, CollectIndexSetStatistics, false,                        \
2869          "Collect information about IndexSets")                            \
2870                                                                            \
2871  develop(bool, UseLoopSafepoints, true,                                    \
2872          "Generate Safepoint nodes in every loop")                         \
2873                                                                            \
2874  develop(intx, FastAllocateSizeLimit, 128*K,                               \
2875          /* Note:  This value is zero mod 1<<13 for a cheap sparc set. */  \
2876          "Inline allocations larger than this in doublewords must go slow")\
2877                                                                            \
2878  product(bool, AggressiveOpts, false,                                      \
2879          "Enable aggressive optimizations - see arguments.cpp")            \
2880                                                                            \
2881  product_pd(uintx, TypeProfileLevel,                                       \
2882          "=XYZ, with Z: Type profiling of arguments at call; "             \
2883                     "Y: Type profiling of return value at call; "          \
2884                     "X: Type profiling of parameters to methods; "         \
2885          "X, Y and Z in 0=off ; 1=jsr292 only; 2=all methods")             \
2886                                                                            \
2887  product(intx, TypeProfileArgsLimit,     2,                                \
2888          "max number of call arguments to consider for type profiling")    \
2889                                                                            \
2890  product(intx, TypeProfileParmsLimit,    2,                                \
2891          "max number of incoming parameters to consider for type profiling"\
2892          ", -1 for all")                                                   \
2893                                                                            \
2894  /* statistics */                                                          \
2895  develop(bool, CountCompiledCalls, false,                                  \
2896          "Count method invocations")                                       \
2897                                                                            \
2898  notproduct(bool, CountRuntimeCalls, false,                                \
2899          "Count VM runtime calls")                                         \
2900                                                                            \
2901  develop(bool, CountJNICalls, false,                                       \
2902          "Count jni method invocations")                                   \
2903                                                                            \
2904  notproduct(bool, CountJVMCalls, false,                                    \
2905          "Count jvm method invocations")                                   \
2906                                                                            \
2907  notproduct(bool, CountRemovableExceptions, false,                         \
2908          "Count exceptions that could be replaced by branches due to "     \
2909          "inlining")                                                       \
2910                                                                            \
2911  notproduct(bool, ICMissHistogram, false,                                  \
2912          "Produce histogram of IC misses")                                 \
2913                                                                            \
2914  /* interpreter */                                                         \
2915  develop(bool, ClearInterpreterLocals, false,                              \
2916          "Always clear local variables of interpreter activations upon "   \
2917          "entry")                                                          \
2918                                                                            \
2919  product_pd(bool, RewriteBytecodes,                                        \
2920          "Allow rewriting of bytecodes (bytecodes are not immutable)")     \
2921                                                                            \
2922  product_pd(bool, RewriteFrequentPairs,                                    \
2923          "Rewrite frequently used bytecode pairs into a single bytecode")  \
2924                                                                            \
2925  diagnostic(bool, PrintInterpreter, false,                                 \
2926          "Print the generated interpreter code")                           \
2927                                                                            \
2928  product(bool, UseInterpreter, true,                                       \
2929          "Use interpreter for non-compiled methods")                       \
2930                                                                            \
2931  develop(bool, UseFastSignatureHandlers, true,                             \
2932          "Use fast signature handlers for native calls")                   \
2933                                                                            \
2934  product(bool, UseLoopCounter, true,                                       \
2935          "Increment invocation counter on backward branch")                \
2936                                                                            \
2937  product_pd(bool, UseOnStackReplacement,                                   \
2938          "Use on stack replacement, calls runtime if invoc. counter "      \
2939          "overflows in loop")                                              \
2940                                                                            \
2941  notproduct(bool, TraceOnStackReplacement, false,                          \
2942          "Trace on stack replacement")                                     \
2943                                                                            \
2944  product_pd(bool, PreferInterpreterNativeStubs,                            \
2945          "Use always interpreter stubs for native methods invoked via "    \
2946          "interpreter")                                                    \
2947                                                                            \
2948  develop(bool, CountBytecodes, false,                                      \
2949          "Count number of bytecodes executed")                             \
2950                                                                            \
2951  develop(bool, PrintBytecodeHistogram, false,                              \
2952          "Print histogram of the executed bytecodes")                      \
2953                                                                            \
2954  develop(bool, PrintBytecodePairHistogram, false,                          \
2955          "Print histogram of the executed bytecode pairs")                 \
2956                                                                            \
2957  diagnostic(bool, PrintSignatureHandlers, false,                           \
2958          "Print code generated for native method signature handlers")      \
2959                                                                            \
2960  develop(bool, VerifyOops, false,                                          \
2961          "Do plausibility checks for oops")                                \
2962                                                                            \
2963  develop(bool, CheckUnhandledOops, false,                                  \
2964          "Check for unhandled oops in VM code")                            \
2965                                                                            \
2966  develop(bool, VerifyJNIFields, trueInDebug,                               \
2967          "Verify jfieldIDs for instance fields")                           \
2968                                                                            \
2969  notproduct(bool, VerifyJNIEnvThread, false,                               \
2970          "Verify JNIEnv.thread == Thread::current() when entering VM "     \
2971          "from JNI")                                                       \
2972                                                                            \
2973  develop(bool, VerifyFPU, false,                                           \
2974          "Verify FPU state (check for NaN's, etc.)")                       \
2975                                                                            \
2976  develop(bool, VerifyThread, false,                                        \
2977          "Watch the thread register for corruption (SPARC only)")          \
2978                                                                            \
2979  develop(bool, VerifyActivationFrameSize, false,                           \
2980          "Verify that activation frame didn't become smaller than its "    \
2981          "minimal size")                                                   \
2982                                                                            \
2983  develop(bool, TraceFrequencyInlining, false,                              \
2984          "Trace frequency based inlining")                                 \
2985                                                                            \
2986  develop_pd(bool, InlineIntrinsics,                                        \
2987          "Inline intrinsics that can be statically resolved")              \
2988                                                                            \
2989  product_pd(bool, ProfileInterpreter,                                      \
2990          "Profile at the bytecode level during interpretation")            \
2991                                                                            \
2992  develop(bool, TraceProfileInterpreter, false,                             \
2993          "Trace profiling at the bytecode level during interpretation. "   \
2994          "This outputs the profiling information collected to improve "    \
2995          "jit compilation.")                                               \
2996                                                                            \
2997  develop_pd(bool, ProfileTraps,                                            \
2998          "Profile deoptimization traps at the bytecode level")             \
2999                                                                            \
3000  product(intx, ProfileMaturityPercentage, 20,                              \
3001          "number of method invocations/branches (expressed as % of "       \
3002          "CompileThreshold) before using the method's profile")            \
3003          range(0, 100)                                                     \
3004                                                                            \
3005  diagnostic(bool, PrintMethodData, false,                                  \
3006          "Print the results of +ProfileInterpreter at end of run")         \
3007                                                                            \
3008  develop(bool, VerifyDataPointer, trueInDebug,                             \
3009          "Verify the method data pointer during interpreter profiling")    \
3010                                                                            \
3011  develop(bool, VerifyCompiledCode, false,                                  \
3012          "Include miscellaneous runtime verifications in nmethod code; "   \
3013          "default off because it disturbs nmethod size heuristics")        \
3014                                                                            \
3015  notproduct(bool, CrashGCForDumpingJavaThread, false,                      \
3016          "Manually make GC thread crash then dump java stack trace;  "     \
3017          "Test only")                                                      \
3018                                                                            \
3019  /* compilation */                                                         \
3020  product(bool, UseCompiler, true,                                          \
3021          "Use Just-In-Time compilation")                                   \
3022                                                                            \
3023  develop(bool, TraceCompilationPolicy, false,                              \
3024          "Trace compilation policy")                                       \
3025                                                                            \
3026  develop(bool, TimeCompilationPolicy, false,                               \
3027          "Time the compilation policy")                                    \
3028                                                                            \
3029  product(bool, UseCounterDecay, true,                                      \
3030          "Adjust recompilation counters")                                  \
3031                                                                            \
3032  develop(intx, CounterHalfLifeTime,    30,                                 \
3033          "Half-life time of invocation counters (in seconds)")             \
3034                                                                            \
3035  develop(intx, CounterDecayMinIntervalLength,   500,                       \
3036          "The minimum interval (in milliseconds) between invocation of "   \
3037          "CounterDecay")                                                   \
3038                                                                            \
3039  product(bool, AlwaysCompileLoopMethods, false,                            \
3040          "When using recompilation, never interpret methods "              \
3041          "containing loops")                                               \
3042                                                                            \
3043  product(bool, DontCompileHugeMethods, true,                               \
3044          "Do not compile methods > HugeMethodLimit")                       \
3045                                                                            \
3046  /* Bytecode escape analysis estimation. */                                \
3047  product(bool, EstimateArgEscape, true,                                    \
3048          "Analyze bytecodes to estimate escape state of arguments")        \
3049                                                                            \
3050  product(intx, BCEATraceLevel, 0,                                          \
3051          "How much tracing to do of bytecode escape analysis estimates")   \
3052                                                                            \
3053  product(intx, MaxBCEAEstimateLevel, 5,                                    \
3054          "Maximum number of nested calls that are analyzed by BC EA")      \
3055                                                                            \
3056  product(intx, MaxBCEAEstimateSize, 150,                                   \
3057          "Maximum bytecode size of a method to be analyzed by BC EA")      \
3058                                                                            \
3059  product(intx,  AllocatePrefetchStyle, 1,                                  \
3060          "0 = no prefetch, "                                               \
3061          "1 = prefetch instructions for each allocation, "                 \
3062          "2 = use TLAB watermark to gate allocation prefetch, "            \
3063          "3 = use BIS instruction on Sparc for allocation prefetch")       \
3064          range(0, 3)                                                       \
3065                                                                            \
3066  product(intx,  AllocatePrefetchDistance, -1,                              \
3067          "Distance to prefetch ahead of allocation pointer")               \
3068                                                                            \
3069  product(intx,  AllocatePrefetchLines, 3,                                  \
3070          "Number of lines to prefetch ahead of array allocation pointer")  \
3071                                                                            \
3072  product(intx,  AllocateInstancePrefetchLines, 1,                          \
3073          "Number of lines to prefetch ahead of instance allocation "       \
3074          "pointer")                                                        \
3075                                                                            \
3076  product(intx,  AllocatePrefetchStepSize, 16,                              \
3077          "Step size in bytes of sequential prefetch instructions")         \
3078                                                                            \
3079  product(intx,  AllocatePrefetchInstr, 0,                                  \
3080          "Prefetch instruction to prefetch ahead of allocation pointer")   \
3081                                                                            \
3082  /* deoptimization */                                                      \
3083  develop(bool, TraceDeoptimization, false,                                 \
3084          "Trace deoptimization")                                           \
3085                                                                            \
3086  develop(bool, DebugDeoptimization, false,                                 \
3087          "Tracing various information while debugging deoptimization")     \
3088                                                                            \
3089  product(intx, SelfDestructTimer, 0,                                       \
3090          "Will cause VM to terminate after a given time (in minutes) "     \
3091          "(0 means off)")                                                  \
3092                                                                            \
3093  product(intx, MaxJavaStackTraceDepth, 1024,                               \
3094          "The maximum number of lines in the stack trace for Java "        \
3095          "exceptions (0 means all)")                                       \
3096                                                                            \
3097  NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000,          \
3098          "Guarantee a safepoint (at least) every so many milliseconds "    \
3099          "(0 means none)"))                                                \
3100                                                                            \
3101  EMBEDDED_ONLY(product(intx, GuaranteedSafepointInterval, 0,               \
3102          "Guarantee a safepoint (at least) every so many milliseconds "    \
3103          "(0 means none)"))                                                \
3104                                                                            \
3105  product(intx, SafepointTimeoutDelay, 10000,                               \
3106          "Delay in milliseconds for option SafepointTimeout")              \
3107                                                                            \
3108  product(intx, NmethodSweepActivity, 10,                                   \
3109          "Removes cold nmethods from code cache if > 0. Higher values "    \
3110          "result in more aggressive sweeping")                             \
3111          range(0, 2000)                                                    \
3112                                                                            \
3113  notproduct(bool, LogSweeper, false,                                       \
3114          "Keep a ring buffer of sweeper activity")                         \
3115                                                                            \
3116  notproduct(intx, SweeperLogEntries, 1024,                                 \
3117          "Number of records in the ring buffer of sweeper activity")       \
3118                                                                            \
3119  notproduct(intx, MemProfilingInterval, 500,                               \
3120          "Time between each invocation of the MemProfiler")                \
3121                                                                            \
3122  develop(intx, MallocCatchPtr, -1,                                         \
3123          "Hit breakpoint when mallocing/freeing this pointer")             \
3124                                                                            \
3125  notproduct(ccstrlist, SuppressErrorAt, "",                                \
3126          "List of assertions (file:line) to muzzle")                       \
3127                                                                            \
3128  notproduct(size_t, HandleAllocationLimit, 1024,                           \
3129          "Threshold for HandleMark allocation when +TraceHandleAllocation "\
3130          "is used")                                                        \
3131                                                                            \
3132  develop(size_t, TotalHandleAllocationLimit, 1024,                         \
3133          "Threshold for total handle allocation when "                     \
3134          "+TraceHandleAllocation is used")                                 \
3135                                                                            \
3136  develop(intx, StackPrintLimit, 100,                                       \
3137          "number of stack frames to print in VM-level stack dump")         \
3138                                                                            \
3139  notproduct(intx, MaxElementPrintSize, 256,                                \
3140          "maximum number of elements to print")                            \
3141                                                                            \
3142  notproduct(intx, MaxSubklassPrintSize, 4,                                 \
3143          "maximum number of subklasses to print when printing klass")      \
3144                                                                            \
3145  product(intx, MaxInlineLevel, 9,                                          \
3146          "maximum number of nested calls that are inlined")                \
3147                                                                            \
3148  product(intx, MaxRecursiveInlineLevel, 1,                                 \
3149          "maximum number of nested recursive calls that are inlined")      \
3150                                                                            \
3151  develop(intx, MaxForceInlineLevel, 100,                                   \
3152          "maximum number of nested calls that are forced for inlining "    \
3153          "(using CompileCommand or marked w/ @ForceInline)")               \
3154                                                                            \
3155  product_pd(intx, InlineSmallCode,                                         \
3156          "Only inline already compiled methods if their code size is "     \
3157          "less than this")                                                 \
3158                                                                            \
3159  product(intx, MaxInlineSize, 35,                                          \
3160          "The maximum bytecode size of a method to be inlined")            \
3161                                                                            \
3162  product_pd(intx, FreqInlineSize,                                          \
3163          "The maximum bytecode size of a frequent method to be inlined")   \
3164                                                                            \
3165  product(intx, MaxTrivialSize, 6,                                          \
3166          "The maximum bytecode size of a trivial method to be inlined")    \
3167                                                                            \
3168  product(intx, MinInliningThreshold, 250,                                  \
3169          "The minimum invocation count a method needs to have to be "      \
3170          "inlined")                                                        \
3171                                                                            \
3172  develop(intx, MethodHistogramCutoff, 100,                                 \
3173          "The cutoff value for method invocation histogram (+CountCalls)") \
3174                                                                            \
3175  develop(intx, ProfilerNumberOfInterpretedMethods, 25,                     \
3176          "Number of interpreted methods to show in profile")               \
3177                                                                            \
3178  develop(intx, ProfilerNumberOfCompiledMethods, 25,                        \
3179          "Number of compiled methods to show in profile")                  \
3180                                                                            \
3181  develop(intx, ProfilerNumberOfStubMethods, 25,                            \
3182          "Number of stub methods to show in profile")                      \
3183                                                                            \
3184  develop(intx, ProfilerNumberOfRuntimeStubNodes, 25,                       \
3185          "Number of runtime stub nodes to show in profile")                \
3186                                                                            \
3187  product(intx, ProfileIntervalsTicks, 100,                                 \
3188          "Number of ticks between printing of interval profile "           \
3189          "(+ProfileIntervals)")                                            \
3190                                                                            \
3191  notproduct(intx, ScavengeALotInterval,     1,                             \
3192          "Interval between which scavenge will occur with +ScavengeALot")  \
3193                                                                            \
3194  notproduct(intx, FullGCALotInterval,     1,                               \
3195          "Interval between which full gc will occur with +FullGCALot")     \
3196                                                                            \
3197  notproduct(intx, FullGCALotStart,     0,                                  \
3198          "For which invocation to start FullGCAlot")                       \
3199                                                                            \
3200  notproduct(intx, FullGCALotDummies,  32*K,                                \
3201          "Dummy object allocated with +FullGCALot, forcing all objects "   \
3202          "to move")                                                        \
3203                                                                            \
3204  develop(intx, DontYieldALotInterval,    10,                               \
3205          "Interval between which yields will be dropped (milliseconds)")   \
3206                                                                            \
3207  develop(intx, MinSleepInterval,     1,                                    \
3208          "Minimum sleep() interval (milliseconds) when "                   \
3209          "ConvertSleepToYield is off (used for Solaris)")                  \
3210                                                                            \
3211  develop(intx, ProfilerPCTickThreshold,    15,                             \
3212          "Number of ticks in a PC buckets to be a hotspot")                \
3213                                                                            \
3214  notproduct(intx, DeoptimizeALotInterval,     5,                           \
3215          "Number of exits until DeoptimizeALot kicks in")                  \
3216                                                                            \
3217  notproduct(intx, ZombieALotInterval,     5,                               \
3218          "Number of exits until ZombieALot kicks in")                      \
3219                                                                            \
3220  diagnostic(intx, MallocVerifyInterval,     0,                             \
3221          "If non-zero, verify C heap after every N calls to "              \
3222          "malloc/realloc/free")                                            \
3223                                                                            \
3224  diagnostic(intx, MallocVerifyStart,     0,                                \
3225          "If non-zero, start verifying C heap after Nth call to "          \
3226          "malloc/realloc/free")                                            \
3227                                                                            \
3228  diagnostic(uintx, MallocMaxTestWords,     0,                              \
3229          "If non-zero, maximum number of words that malloc/realloc can "   \
3230          "allocate (for testing only)")                                    \
3231                                                                            \
3232  product(intx, TypeProfileWidth,     2,                                    \
3233          "Number of receiver types to record in call/cast profile")        \
3234                                                                            \
3235  develop(intx, BciProfileWidth,      2,                                    \
3236          "Number of return bci's to record in ret profile")                \
3237                                                                            \
3238  product(intx, PerMethodRecompilationCutoff, 400,                          \
3239          "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
3240          range(-1, max_intx)                                               \
3241                                                                            \
3242  product(intx, PerBytecodeRecompilationCutoff, 200,                        \
3243          "Per-BCI limit on repeated recompilation (-1=>'Inf')")            \
3244          range(-1, max_intx)                                               \
3245                                                                            \
3246  product(intx, PerMethodTrapLimit,  100,                                   \
3247          "Limit on traps (of one kind) in a method (includes inlines)")    \
3248                                                                            \
3249  experimental(intx, PerMethodSpecTrapLimit,  5000,                         \
3250          "Limit on speculative traps (of one kind) in a method "           \
3251          "(includes inlines)")                                             \
3252                                                                            \
3253  product(intx, PerBytecodeTrapLimit,  4,                                   \
3254          "Limit on traps (of one kind) at a particular BCI")               \
3255                                                                            \
3256  experimental(intx, SpecTrapLimitExtraEntries,  3,                         \
3257          "Extra method data trap entries for speculation")                 \
3258                                                                            \
3259  develop(intx, InlineFrequencyRatio,    20,                                \
3260          "Ratio of call site execution to caller method invocation")       \
3261                                                                            \
3262  develop_pd(intx, InlineFrequencyCount,                                    \
3263          "Count of call site execution necessary to trigger frequent "     \
3264          "inlining")                                                       \
3265                                                                            \
3266  develop(intx, InlineThrowCount,    50,                                    \
3267          "Force inlining of interpreted methods that throw this often")    \
3268                                                                            \
3269  develop(intx, InlineThrowMaxSize,   200,                                  \
3270          "Force inlining of throwing methods smaller than this")           \
3271                                                                            \
3272  develop(intx, ProfilerNodeSize,  1024,                                    \
3273          "Size in K to allocate for the Profile Nodes of each thread")     \
3274                                                                            \
3275  /* gc parameters */                                                       \
3276  product(size_t, InitialHeapSize, 0,                                       \
3277          "Initial heap size (in bytes); zero means use ergonomics")        \
3278          constraint(InitialHeapSizeConstraintFunc,AfterErgo)               \
3279                                                                            \
3280  product(size_t, MaxHeapSize, ScaleForWordSize(96*M),                      \
3281          "Maximum heap size (in bytes)")                                   \
3282          constraint(MaxHeapSizeConstraintFunc,AfterErgo)                   \
3283                                                                            \
3284  product(size_t, OldSize, ScaleForWordSize(4*M),                           \
3285          "Initial tenured generation size (in bytes)")                     \
3286                                                                            \
3287  product(size_t, NewSize, ScaleForWordSize(1*M),                           \
3288          "Initial new generation size (in bytes)")                         \
3289          constraint(NewSizeConstraintFunc,AfterErgo)                       \
3290                                                                            \
3291  product(size_t, MaxNewSize, max_uintx,                                    \
3292          "Maximum new generation size (in bytes), max_uintx means set "    \
3293          "ergonomically")                                                  \
3294                                                                            \
3295  product(size_t, PretenureSizeThreshold, 0,                                \
3296          "Maximum size in bytes of objects allocated in DefNew "           \
3297          "generation; zero means no maximum")                              \
3298                                                                            \
3299  product(size_t, MinTLABSize, 2*K,                                         \
3300          "Minimum allowed TLAB size (in bytes)")                           \
3301          range(1, max_uintx)                                               \
3302          constraint(MinTLABSizeConstraintFunc,AfterMemoryInit)             \
3303                                                                            \
3304  product(size_t, TLABSize, 0,                                              \
3305          "Starting TLAB size (in bytes); zero means set ergonomically")    \
3306          constraint(TLABSizeConstraintFunc,AfterMemoryInit)                \
3307                                                                            \
3308  product(size_t, YoungPLABSize, 4096,                                      \
3309          "Size of young gen promotion LAB's (in HeapWords)")               \
3310          constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit)           \
3311                                                                            \
3312  product(size_t, OldPLABSize, 1024,                                        \
3313          "Size of old gen promotion LAB's (in HeapWords), or Number "      \
3314          "of blocks to attempt to claim when refilling CMS LAB's")         \
3315          constraint(OldPLABSizeConstraintFunc,AfterMemoryInit)             \
3316                                                                            \
3317  product(uintx, TLABAllocationWeight, 35,                                  \
3318          "Allocation averaging weight")                                    \
3319          range(0, 100)                                                     \
3320                                                                            \
3321  /* Limit the lower bound of this flag to 1 as it is used  */              \
3322  /* in a division expression.                              */              \
3323  product(uintx, TLABWasteTargetPercent, 1,                                 \
3324          "Percentage of Eden that can be wasted")                          \
3325          range(1, 100)                                                     \
3326                                                                            \
3327  product(uintx, TLABRefillWasteFraction,    64,                            \
3328          "Maximum TLAB waste at a refill (internal fragmentation)")        \
3329          range(1, max_uintx)                                               \
3330                                                                            \
3331  product(uintx, TLABWasteIncrement,    4,                                  \
3332          "Increment allowed waste at slow allocation")                     \
3333                                                                            \
3334  product(uintx, SurvivorRatio, 8,                                          \
3335          "Ratio of eden/survivor space size")                              \
3336          range(1, max_uintx-2)                                             \
3337          constraint(SurvivorRatioConstraintFunc,AfterMemoryInit)           \
3338                                                                            \
3339  product(uintx, NewRatio, 2,                                               \
3340          "Ratio of old/new generation sizes")                              \
3341          range(0, max_uintx-1)                                             \
3342                                                                            \
3343  product_pd(size_t, NewSizeThreadIncrease,                                 \
3344          "Additional size added to desired new generation size per "       \
3345          "non-daemon thread (in bytes)")                                   \
3346                                                                            \
3347  product_pd(size_t, MetaspaceSize,                                         \
3348          "Initial size of Metaspaces (in bytes)")                          \
3349          constraint(MetaspaceSizeConstraintFunc,AfterErgo)                 \
3350                                                                            \
3351  product(size_t, MaxMetaspaceSize, max_uintx,                              \
3352          "Maximum size of Metaspaces (in bytes)")                          \
3353          constraint(MaxMetaspaceSizeConstraintFunc,AfterErgo)              \
3354                                                                            \
3355  product(size_t, CompressedClassSpaceSize, 1*G,                            \
3356          "Maximum size of class area in Metaspace when compressed "        \
3357          "class pointers are used")                                        \
3358          range(1*M, 3*G)                                                   \
3359                                                                            \
3360  manageable(uintx, MinHeapFreeRatio, 40,                                   \
3361          "The minimum percentage of heap free after GC to avoid expansion."\
3362          " For most GCs this applies to the old generation. In G1 and"     \
3363          " ParallelGC it applies to the whole heap.")                      \
3364          range(0, 100)                                                     \
3365          constraint(MinHeapFreeRatioConstraintFunc,AfterErgo)              \
3366                                                                            \
3367  manageable(uintx, MaxHeapFreeRatio, 70,                                   \
3368          "The maximum percentage of heap free after GC to avoid shrinking."\
3369          " For most GCs this applies to the old generation. In G1 and"     \
3370          " ParallelGC it applies to the whole heap.")                      \
3371          range(0, 100)                                                     \
3372          constraint(MaxHeapFreeRatioConstraintFunc,AfterErgo)              \
3373                                                                            \
3374  product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
3375          "Number of milliseconds per MB of free space in the heap")        \
3376          range(0, max_intx)                                                \
3377          constraint(SoftRefLRUPolicyMSPerMBConstraintFunc,AfterMemoryInit) \
3378                                                                            \
3379  product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K),               \
3380          "The minimum change in heap space due to GC (in bytes)")          \
3381                                                                            \
3382  product(size_t, MinMetaspaceExpansion, ScaleForWordSize(256*K),           \
3383          "The minimum expansion of Metaspace (in bytes)")                  \
3384                                                                            \
3385  product(uintx, MaxMetaspaceFreeRatio,    70,                              \
3386          "The maximum percentage of Metaspace free after GC to avoid "     \
3387          "shrinking")                                                      \
3388          range(0, 100)                                                     \
3389          constraint(MaxMetaspaceFreeRatioConstraintFunc,AfterErgo)         \
3390                                                                            \
3391  product(uintx, MinMetaspaceFreeRatio,    40,                              \
3392          "The minimum percentage of Metaspace free after GC to avoid "     \
3393          "expansion")                                                      \
3394          range(0, 99)                                                      \
3395          constraint(MinMetaspaceFreeRatioConstraintFunc,AfterErgo)         \
3396                                                                            \
3397  product(size_t, MaxMetaspaceExpansion, ScaleForWordSize(4*M),             \
3398          "The maximum expansion of Metaspace without full GC (in bytes)")  \
3399                                                                            \
3400  product(uintx, QueuedAllocationWarningCount, 0,                           \
3401          "Number of times an allocation that queues behind a GC "          \
3402          "will retry before printing a warning")                           \
3403                                                                            \
3404  diagnostic(uintx, VerifyGCStartAt,   0,                                   \
3405          "GC invoke count where +VerifyBefore/AfterGC kicks in")           \
3406                                                                            \
3407  diagnostic(intx, VerifyGCLevel,     0,                                    \
3408          "Generation level at which to start +VerifyBefore/AfterGC")       \
3409          range(0, 1)                                                       \
3410                                                                            \
3411  product(uintx, MaxTenuringThreshold,    15,                               \
3412          "Maximum value for tenuring threshold")                           \
3413          range(0, markOopDesc::max_age + 1)                                \
3414          constraint(MaxTenuringThresholdConstraintFunc,AfterErgo)          \
3415                                                                            \
3416  product(uintx, InitialTenuringThreshold,    7,                            \
3417          "Initial value for tenuring threshold")                           \
3418          range(0, markOopDesc::max_age + 1)                                \
3419          constraint(InitialTenuringThresholdConstraintFunc,AfterErgo)      \
3420                                                                            \
3421  product(uintx, TargetSurvivorRatio,    50,                                \
3422          "Desired percentage of survivor space used after scavenge")       \
3423          range(0, 100)                                                     \
3424                                                                            \
3425  product(uintx, MarkSweepDeadRatio,     5,                                 \
3426          "Percentage (0-100) of the old gen allowed as dead wood. "        \
3427          "Serial mark sweep treats this as both the minimum and maximum "  \
3428          "value. "                                                         \
3429          "CMS uses this value only if it falls back to mark sweep. "       \
3430          "Par compact uses a variable scale based on the density of the "  \
3431          "generation and treats this as the maximum value when the heap "  \
3432          "is either completely full or completely empty.  Par compact "    \
3433          "also has a smaller default value; see arguments.cpp.")           \
3434          range(0, 100)                                                     \
3435                                                                            \
3436  product(uintx, MarkSweepAlwaysCompactCount,     4,                        \
3437          "How often should we fully compact the heap (ignoring the dead "  \
3438          "space parameters)")                                              \
3439          range(1, max_uintx)                                               \
3440                                                                            \
3441  product(intx, PrintCMSStatistics, 0,                                      \
3442          "Statistics for CMS")                                             \
3443                                                                            \
3444  product(bool, PrintCMSInitiationStatistics, false,                        \
3445          "Statistics for initiating a CMS collection")                     \
3446                                                                            \
3447  product(intx, PrintFLSStatistics, 0,                                      \
3448          "Statistics for CMS' FreeListSpace")                              \
3449                                                                            \
3450  product(intx, PrintFLSCensus, 0,                                          \
3451          "Census for CMS' FreeListSpace")                                  \
3452                                                                            \
3453  develop(uintx, GCExpandToAllocateDelayMillis, 0,                          \
3454          "Delay between expansion and allocation (in milliseconds)")       \
3455                                                                            \
3456  develop(uintx, GCWorkerDelayMillis, 0,                                    \
3457          "Delay in scheduling GC workers (in milliseconds)")               \
3458                                                                            \
3459  product(intx, DeferThrSuspendLoopCount,     4000,                         \
3460          "(Unstable) Number of times to iterate in safepoint loop "        \
3461          "before blocking VM threads ")                                    \
3462                                                                            \
3463  product(intx, DeferPollingPageLoopCount,     -1,                          \
3464          "(Unsafe,Unstable) Number of iterations in safepoint loop "       \
3465          "before changing safepoint polling page to RO ")                  \
3466                                                                            \
3467  product(intx, SafepointSpinBeforeYield, 2000, "(Unstable)")               \
3468          range(0, max_intx)                                                \
3469                                                                            \
3470  product(bool, PSChunkLargeArrays, true,                                   \
3471          "Process large arrays in chunks")                                 \
3472                                                                            \
3473  product(uintx, GCDrainStackTargetSize, 64,                                \
3474          "Number of entries we will try to leave on the stack "            \
3475          "during parallel gc")                                             \
3476                                                                            \
3477  /* stack parameters */                                                    \
3478  product_pd(intx, StackYellowPages,                                        \
3479          "Number of yellow zone (recoverable overflows) pages")            \
3480          range(1, max_intx)                                                \
3481                                                                            \
3482  product_pd(intx, StackRedPages,                                           \
3483          "Number of red zone (unrecoverable overflows) pages")             \
3484          range(1, max_intx)                                                \
3485                                                                            \
3486  /* greater stack shadow pages can't generate instruction to bang stack */ \
3487  product_pd(intx, StackShadowPages,                                        \
3488          "Number of shadow zone (for overflow checking) pages "            \
3489          "this should exceed the depth of the VM and native call stack")   \
3490          range(1, 50)                                                      \
3491                                                                            \
3492  product_pd(intx, ThreadStackSize,                                         \
3493          "Thread Stack Size (in Kbytes)")                                  \
3494                                                                            \
3495  product_pd(intx, VMThreadStackSize,                                       \
3496          "Non-Java Thread Stack Size (in Kbytes)")                         \
3497                                                                            \
3498  product_pd(intx, CompilerThreadStackSize,                                 \
3499          "Compiler Thread Stack Size (in Kbytes)")                         \
3500                                                                            \
3501  develop_pd(size_t, JVMInvokeMethodSlack,                                  \
3502          "Stack space (bytes) required for JVM_InvokeMethod to complete")  \
3503                                                                            \
3504  /* code cache parameters                                    */            \
3505  /* ppc64/tiered compilation has large code-entry alignment. */            \
3506  develop(uintx, CodeCacheSegmentSize, 64 PPC64_ONLY(+64) NOT_PPC64(TIERED_ONLY(+64)),\
3507          "Code cache segment size (in bytes) - smallest unit of "          \
3508          "allocation")                                                     \
3509          range(1, 1024)                                                    \
3510                                                                            \
3511  develop_pd(intx, CodeEntryAlignment,                                      \
3512          "Code entry alignment for generated code (in bytes)")             \
3513                                                                            \
3514  product_pd(intx, OptoLoopAlignment,                                       \
3515          "Align inner loops to zero relative to this modulus")             \
3516                                                                            \
3517  product_pd(uintx, InitialCodeCacheSize,                                   \
3518          "Initial code cache size (in bytes)")                             \
3519                                                                            \
3520  develop_pd(uintx, CodeCacheMinimumUseSpace,                               \
3521          "Minimum code cache size (in bytes) required to start VM.")       \
3522                                                                            \
3523  product(bool, SegmentedCodeCache, false,                                  \
3524          "Use a segmented code cache")                                     \
3525                                                                            \
3526  product_pd(uintx, ReservedCodeCacheSize,                                  \
3527          "Reserved code cache size (in bytes) - maximum code cache size")  \
3528                                                                            \
3529  product_pd(uintx, NonProfiledCodeHeapSize,                                \
3530          "Size of code heap with non-profiled methods (in bytes)")         \
3531                                                                            \
3532  product_pd(uintx, ProfiledCodeHeapSize,                                   \
3533          "Size of code heap with profiled methods (in bytes)")             \
3534                                                                            \
3535  product_pd(uintx, NonNMethodCodeHeapSize,                                 \
3536          "Size of code heap with non-nmethods (in bytes)")                 \
3537                                                                            \
3538  product_pd(uintx, CodeCacheExpansionSize,                                 \
3539          "Code cache expansion size (in bytes)")                           \
3540                                                                            \
3541  develop_pd(uintx, CodeCacheMinBlockLength,                                \
3542          "Minimum number of segments in a code cache block")               \
3543          range(1, 100)                                                     \
3544                                                                            \
3545  notproduct(bool, ExitOnFullCodeCache, false,                              \
3546          "Exit the VM if we fill the code cache")                          \
3547                                                                            \
3548  product(bool, UseCodeCacheFlushing, true,                                 \
3549          "Remove cold/old nmethods from the code cache")                   \
3550                                                                            \
3551  product(uintx, StartAggressiveSweepingAt, 10,                             \
3552          "Start aggressive sweeping if X[%] of the code cache is free."    \
3553          "Segmented code cache: X[%] of the non-profiled heap."            \
3554          "Non-segmented code cache: X[%] of the total code cache")         \
3555          range(0, 100)                                                     \
3556                                                                            \
3557  /* interpreter debugging */                                               \
3558  develop(intx, BinarySwitchThreshold, 5,                                   \
3559          "Minimal number of lookupswitch entries for rewriting to binary " \
3560          "switch")                                                         \
3561                                                                            \
3562  develop(intx, StopInterpreterAt, 0,                                       \
3563          "Stop interpreter execution at specified bytecode number")        \
3564                                                                            \
3565  develop(intx, TraceBytecodesAt, 0,                                        \
3566          "Trace bytecodes starting with specified bytecode number")        \
3567                                                                            \
3568  /* compiler interface */                                                  \
3569  develop(intx, CIStart, 0,                                                 \
3570          "The id of the first compilation to permit")                      \
3571                                                                            \
3572  develop(intx, CIStop, max_jint,                                           \
3573          "The id of the last compilation to permit")                       \
3574                                                                            \
3575  develop(intx, CIStartOSR, 0,                                              \
3576          "The id of the first osr compilation to permit "                  \
3577          "(CICountOSR must be on)")                                        \
3578                                                                            \
3579  develop(intx, CIStopOSR, max_jint,                                        \
3580          "The id of the last osr compilation to permit "                   \
3581          "(CICountOSR must be on)")                                        \
3582                                                                            \
3583  develop(intx, CIBreakAtOSR, -1,                                           \
3584          "The id of osr compilation to break at")                          \
3585                                                                            \
3586  develop(intx, CIBreakAt, -1,                                              \
3587          "The id of compilation to break at")                              \
3588                                                                            \
3589  product(ccstrlist, CompileOnly, "",                                       \
3590          "List of methods (pkg/class.name) to restrict compilation to")    \
3591                                                                            \
3592  product(ccstr, CompileCommandFile, NULL,                                  \
3593          "Read compiler commands from this file [.hotspot_compiler]")      \
3594                                                                            \
3595  product(ccstrlist, CompileCommand, "",                                    \
3596          "Prepend to .hotspot_compiler; e.g. log,java/lang/String.<init>") \
3597                                                                            \
3598  develop(bool, ReplayCompiles, false,                                      \
3599          "Enable replay of compilations from ReplayDataFile")              \
3600                                                                            \
3601  product(ccstr, ReplayDataFile, NULL,                                      \
3602          "File containing compilation replay information"                  \
3603          "[default: ./replay_pid%p.log] (%p replaced with pid)")           \
3604                                                                            \
3605   product(ccstr, InlineDataFile, NULL,                                     \
3606          "File containing inlining replay information"                     \
3607          "[default: ./inline_pid%p.log] (%p replaced with pid)")           \
3608                                                                            \
3609  develop(intx, ReplaySuppressInitializers, 2,                              \
3610          "Control handling of class initialization during replay: "        \
3611          "0 - don't do anything special; "                                 \
3612          "1 - treat all class initializers as empty; "                     \
3613          "2 - treat class initializers for application classes as empty; " \
3614          "3 - allow all class initializers to run during bootstrap but "   \
3615          "    pretend they are empty after starting replay")               \
3616          range(0, 3)                                                       \
3617                                                                            \
3618  develop(bool, ReplayIgnoreInitErrors, false,                              \
3619          "Ignore exceptions thrown during initialization for replay")      \
3620                                                                            \
3621  product(bool, DumpReplayDataOnError, true,                                \
3622          "Record replay data for crashing compiler threads")               \
3623                                                                            \
3624  product(bool, CICompilerCountPerCPU, false,                               \
3625          "1 compiler thread for log(N CPUs)")                              \
3626                                                                            \
3627  develop(intx, CIFireOOMAt,    -1,                                         \
3628          "Fire OutOfMemoryErrors throughout CI for testing the compiler "  \
3629          "(non-negative value throws OOM after this many CI accesses "     \
3630          "in each compile)")                                               \
3631  notproduct(intx, CICrashAt, -1,                                           \
3632          "id of compilation to trigger assert in compiler thread for "     \
3633          "the purpose of testing, e.g. generation of replay data")         \
3634  notproduct(bool, CIObjectFactoryVerify, false,                            \
3635          "enable potentially expensive verification in ciObjectFactory")   \
3636                                                                            \
3637  /* Priorities */                                                          \
3638  product_pd(bool, UseThreadPriorities,  "Use native thread priorities")    \
3639                                                                            \
3640  product(intx, ThreadPriorityPolicy, 0,                                    \
3641          "0 : Normal.                                                     "\
3642          "    VM chooses priorities that are appropriate for normal       "\
3643          "    applications. On Solaris NORM_PRIORITY and above are mapped "\
3644          "    to normal native priority. Java priorities below "           \
3645          "    NORM_PRIORITY map to lower native priority values. On       "\
3646          "    Windows applications are allowed to use higher native       "\
3647          "    priorities. However, with ThreadPriorityPolicy=0, VM will   "\
3648          "    not use the highest possible native priority,               "\
3649          "    THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with     "\
3650          "    system threads. On Linux thread priorities are ignored      "\
3651          "    because the OS does not support static priority in          "\
3652          "    SCHED_OTHER scheduling class which is the only choice for   "\
3653          "    non-root, non-realtime applications.                        "\
3654          "1 : Aggressive.                                                 "\
3655          "    Java thread priorities map over to the entire range of      "\
3656          "    native thread priorities. Higher Java thread priorities map "\
3657          "    to higher native thread priorities. This policy should be   "\
3658          "    used with care, as sometimes it can cause performance       "\
3659          "    degradation in the application and/or the entire system. On "\
3660          "    Linux this policy requires root privilege.")                 \
3661          range(0, 1)                                                       \
3662                                                                            \
3663  product(bool, ThreadPriorityVerbose, false,                               \
3664          "Print priority changes")                                         \
3665                                                                            \
3666  product(intx, CompilerThreadPriority, -1,                                 \
3667          "The native priority at which compiler threads should run "       \
3668          "(-1 means no change)")                                           \
3669                                                                            \
3670  product(intx, VMThreadPriority, -1,                                       \
3671          "The native priority at which the VM thread should run "          \
3672          "(-1 means no change)")                                           \
3673                                                                            \
3674  product(bool, CompilerThreadHintNoPreempt, true,                          \
3675          "(Solaris only) Give compiler threads an extra quanta")           \
3676                                                                            \
3677  product(bool, VMThreadHintNoPreempt, false,                               \
3678          "(Solaris only) Give VM thread an extra quanta")                  \
3679                                                                            \
3680  product(intx, JavaPriority1_To_OSPriority, -1,                            \
3681          "Map Java priorities to OS priorities")                           \
3682                                                                            \
3683  product(intx, JavaPriority2_To_OSPriority, -1,                            \
3684          "Map Java priorities to OS priorities")                           \
3685                                                                            \
3686  product(intx, JavaPriority3_To_OSPriority, -1,                            \
3687          "Map Java priorities to OS priorities")                           \
3688                                                                            \
3689  product(intx, JavaPriority4_To_OSPriority, -1,                            \
3690          "Map Java priorities to OS priorities")                           \
3691                                                                            \
3692  product(intx, JavaPriority5_To_OSPriority, -1,                            \
3693          "Map Java priorities to OS priorities")                           \
3694                                                                            \
3695  product(intx, JavaPriority6_To_OSPriority, -1,                            \
3696          "Map Java priorities to OS priorities")                           \
3697                                                                            \
3698  product(intx, JavaPriority7_To_OSPriority, -1,                            \
3699          "Map Java priorities to OS priorities")                           \
3700                                                                            \
3701  product(intx, JavaPriority8_To_OSPriority, -1,                            \
3702          "Map Java priorities to OS priorities")                           \
3703                                                                            \
3704  product(intx, JavaPriority9_To_OSPriority, -1,                            \
3705          "Map Java priorities to OS priorities")                           \
3706                                                                            \
3707  product(intx, JavaPriority10_To_OSPriority,-1,                            \
3708          "Map Java priorities to OS priorities")                           \
3709                                                                            \
3710  experimental(bool, UseCriticalJavaThreadPriority, false,                  \
3711          "Java thread priority 10 maps to critical scheduling priority")   \
3712                                                                            \
3713  experimental(bool, UseCriticalCompilerThreadPriority, false,              \
3714          "Compiler thread(s) run at critical scheduling priority")         \
3715                                                                            \
3716  experimental(bool, UseCriticalCMSThreadPriority, false,                   \
3717          "ConcurrentMarkSweep thread runs at critical scheduling priority")\
3718                                                                            \
3719  /* compiler debugging */                                                  \
3720  notproduct(intx, CompileTheWorldStartAt,     1,                           \
3721          "First class to consider when using +CompileTheWorld")            \
3722                                                                            \
3723  notproduct(intx, CompileTheWorldStopAt, max_jint,                         \
3724          "Last class to consider when using +CompileTheWorld")             \
3725                                                                            \
3726  develop(intx, NewCodeParameter,      0,                                   \
3727          "Testing Only: Create a dedicated integer parameter before "      \
3728          "putback")                                                        \
3729                                                                            \
3730  /* new oopmap storage allocation */                                       \
3731  develop(intx, MinOopMapAllocation,     8,                                 \
3732          "Minimum number of OopMap entries in an OopMapSet")               \
3733                                                                            \
3734  /* Background Compilation */                                              \
3735  develop(intx, LongCompileThreshold,     50,                               \
3736          "Used with +TraceLongCompiles")                                   \
3737                                                                            \
3738  /* recompilation */                                                       \
3739  product_pd(intx, CompileThreshold,                                        \
3740          "number of interpreted method invocations before (re-)compiling") \
3741                                                                            \
3742  product(double, CompileThresholdScaling, 1.0,                             \
3743          "Factor to control when first compilation happens "               \
3744          "(both with and without tiered compilation): "                    \
3745          "values greater than 1.0 delay counter overflow, "                \
3746          "values between 0 and 1.0 rush counter overflow, "                \
3747          "value of 1.0 leaves compilation thresholds unchanged "           \
3748          "value of 0.0 is equivalent to -Xint. "                           \
3749          ""                                                                \
3750          "Flag can be set as per-method option. "                          \
3751          "If a value is specified for a method, compilation thresholds "   \
3752          "for that method are scaled by both the value of the global flag "\
3753          "and the value of the per-method flag.")                          \
3754                                                                            \
3755  product(intx, Tier0InvokeNotifyFreqLog, 7,                                \
3756          "Interpreter (tier 0) invocation notification frequency")         \
3757                                                                            \
3758  product(intx, Tier2InvokeNotifyFreqLog, 11,                               \
3759          "C1 without MDO (tier 2) invocation notification frequency")      \
3760                                                                            \
3761  product(intx, Tier3InvokeNotifyFreqLog, 10,                               \
3762          "C1 with MDO profiling (tier 3) invocation notification "         \
3763          "frequency")                                                      \
3764                                                                            \
3765  product(intx, Tier23InlineeNotifyFreqLog, 20,                             \
3766          "Inlinee invocation (tiers 2 and 3) notification frequency")      \
3767                                                                            \
3768  product(intx, Tier0BackedgeNotifyFreqLog, 10,                             \
3769          "Interpreter (tier 0) invocation notification frequency")         \
3770                                                                            \
3771  product(intx, Tier2BackedgeNotifyFreqLog, 14,                             \
3772          "C1 without MDO (tier 2) invocation notification frequency")      \
3773                                                                            \
3774  product(intx, Tier3BackedgeNotifyFreqLog, 13,                             \
3775          "C1 with MDO profiling (tier 3) invocation notification "         \
3776          "frequency")                                                      \
3777                                                                            \
3778  product(intx, Tier2CompileThreshold, 0,                                   \
3779          "threshold at which tier 2 compilation is invoked")               \
3780                                                                            \
3781  product(intx, Tier2BackEdgeThreshold, 0,                                  \
3782          "Back edge threshold at which tier 2 compilation is invoked")     \
3783                                                                            \
3784  product(intx, Tier3InvocationThreshold, 200,                              \
3785          "Compile if number of method invocations crosses this "           \
3786          "threshold")                                                      \
3787                                                                            \
3788  product(intx, Tier3MinInvocationThreshold, 100,                           \
3789          "Minimum invocation to compile at tier 3")                        \
3790                                                                            \
3791  product(intx, Tier3CompileThreshold, 2000,                                \
3792          "Threshold at which tier 3 compilation is invoked (invocation "   \
3793          "minimum must be satisfied")                                      \
3794                                                                            \
3795  product(intx, Tier3BackEdgeThreshold,  60000,                             \
3796          "Back edge threshold at which tier 3 OSR compilation is invoked") \
3797                                                                            \
3798  product(intx, Tier4InvocationThreshold, 5000,                             \
3799          "Compile if number of method invocations crosses this "           \
3800          "threshold")                                                      \
3801                                                                            \
3802  product(intx, Tier4MinInvocationThreshold, 600,                           \
3803          "Minimum invocation to compile at tier 4")                        \
3804                                                                            \
3805  product(intx, Tier4CompileThreshold, 15000,                               \
3806          "Threshold at which tier 4 compilation is invoked (invocation "   \
3807          "minimum must be satisfied")                                      \
3808                                                                            \
3809  product(intx, Tier4BackEdgeThreshold, 40000,                              \
3810          "Back edge threshold at which tier 4 OSR compilation is invoked") \
3811                                                                            \
3812  product(intx, Tier3DelayOn, 5,                                            \
3813          "If C2 queue size grows over this amount per compiler thread "    \
3814          "stop compiling at tier 3 and start compiling at tier 2")         \
3815                                                                            \
3816  product(intx, Tier3DelayOff, 2,                                           \
3817          "If C2 queue size is less than this amount per compiler thread "  \
3818          "allow methods compiled at tier 2 transition to tier 3")          \
3819                                                                            \
3820  product(intx, Tier3LoadFeedback, 5,                                       \
3821          "Tier 3 thresholds will increase twofold when C1 queue size "     \
3822          "reaches this amount per compiler thread")                        \
3823                                                                            \
3824  product(intx, Tier4LoadFeedback, 3,                                       \
3825          "Tier 4 thresholds will increase twofold when C2 queue size "     \
3826          "reaches this amount per compiler thread")                        \
3827                                                                            \
3828  product(intx, TieredCompileTaskTimeout, 50,                               \
3829          "Kill compile task if method was not used within "                \
3830          "given timeout in milliseconds")                                  \
3831                                                                            \
3832  product(intx, TieredStopAtLevel, 4,                                       \
3833          "Stop at given compilation level")                                \
3834                                                                            \
3835  product(intx, Tier0ProfilingStartPercentage, 200,                         \
3836          "Start profiling in interpreter if the counters exceed tier 3 "   \
3837          "thresholds by the specified percentage")                         \
3838                                                                            \
3839  product(uintx, IncreaseFirstTierCompileThresholdAt, 50,                   \
3840          "Increase the compile threshold for C1 compilation if the code "  \
3841          "cache is filled by the specified percentage")                    \
3842          range(0, 99)                                                      \
3843                                                                            \
3844  product(intx, TieredRateUpdateMinTime, 1,                                 \
3845          "Minimum rate sampling interval (in milliseconds)")               \
3846                                                                            \
3847  product(intx, TieredRateUpdateMaxTime, 25,                                \
3848          "Maximum rate sampling interval (in milliseconds)")               \
3849                                                                            \
3850  product_pd(bool, TieredCompilation,                                       \
3851          "Enable tiered compilation")                                      \
3852                                                                            \
3853  product(bool, PrintTieredEvents, false,                                   \
3854          "Print tiered events notifications")                              \
3855                                                                            \
3856  product_pd(intx, OnStackReplacePercentage,                                \
3857          "NON_TIERED number of method invocations/branches (expressed as " \
3858          "% of CompileThreshold) before (re-)compiling OSR code")          \
3859                                                                            \
3860  product(intx, InterpreterProfilePercentage, 33,                           \
3861          "NON_TIERED number of method invocations/branches (expressed as " \
3862          "% of CompileThreshold) before profiling in the interpreter")     \
3863          range(0, 100)                                                     \
3864                                                                            \
3865  develop(intx, MaxRecompilationSearchLength,    10,                        \
3866          "The maximum number of frames to inspect when searching for "     \
3867          "recompilee")                                                     \
3868                                                                            \
3869  develop(intx, MaxInterpretedSearchLength,     3,                          \
3870          "The maximum number of interpreted frames to skip when searching "\
3871          "for recompilee")                                                 \
3872                                                                            \
3873  develop(intx, DesiredMethodLimit,  8000,                                  \
3874          "The desired maximum method size (in bytecodes) after inlining")  \
3875                                                                            \
3876  develop(intx, HugeMethodLimit,  8000,                                     \
3877          "Don't compile methods larger than this if "                      \
3878          "+DontCompileHugeMethods")                                        \
3879                                                                            \
3880  /* New JDK 1.4 reflection implementation */                               \
3881                                                                            \
3882  develop(intx, FastSuperclassLimit, 8,                                     \
3883          "Depth of hardwired instanceof accelerator array")                \
3884                                                                            \
3885  /* Properties for Java libraries  */                                      \
3886                                                                            \
3887  product(size_t, MaxDirectMemorySize, 0,                                   \
3888          "Maximum total size of NIO direct-buffer allocations")            \
3889                                                                            \
3890  /* Flags used for temporary code during development  */                   \
3891                                                                            \
3892  diagnostic(bool, UseNewCode, false,                                       \
3893          "Testing Only: Use the new version while testing")                \
3894                                                                            \
3895  diagnostic(bool, UseNewCode2, false,                                      \
3896          "Testing Only: Use the new version while testing")                \
3897                                                                            \
3898  diagnostic(bool, UseNewCode3, false,                                      \
3899          "Testing Only: Use the new version while testing")                \
3900                                                                            \
3901  /* flags for performance data collection */                               \
3902                                                                            \
3903  product(bool, UsePerfData, falseInEmbedded,                               \
3904          "Flag to disable jvmstat instrumentation for performance testing "\
3905          "and problem isolation purposes")                                 \
3906                                                                            \
3907  product(bool, PerfDataSaveToFile, false,                                  \
3908          "Save PerfData memory to hsperfdata_<pid> file on exit")          \
3909                                                                            \
3910  product(ccstr, PerfDataSaveFile, NULL,                                    \
3911          "Save PerfData memory to the specified absolute pathname. "       \
3912          "The string %p in the file name (if present) "                    \
3913          "will be replaced by pid")                                        \
3914                                                                            \
3915  product(intx, PerfDataSamplingInterval, 50,                               \
3916          "Data sampling interval (in milliseconds)")                       \
3917                                                                            \
3918  develop(bool, PerfTraceDataCreation, false,                               \
3919          "Trace creation of Performance Data Entries")                     \
3920                                                                            \
3921  develop(bool, PerfTraceMemOps, false,                                     \
3922          "Trace PerfMemory create/attach/detach calls")                    \
3923                                                                            \
3924  product(bool, PerfDisableSharedMem, false,                                \
3925          "Store performance data in standard memory")                      \
3926                                                                            \
3927  product(intx, PerfDataMemorySize, 64*K,                                   \
3928          "Size of performance data memory region. Will be rounded "        \
3929          "up to a multiple of the native os page size.")                   \
3930                                                                            \
3931  product(intx, PerfMaxStringConstLength, 1024,                             \
3932          "Maximum PerfStringConstant string length before truncation")     \
3933                                                                            \
3934  product(bool, PerfAllowAtExitRegistration, false,                         \
3935          "Allow registration of atexit() methods")                         \
3936                                                                            \
3937  product(bool, PerfBypassFileSystemCheck, false,                           \
3938          "Bypass Win32 file system criteria checks (Windows Only)")        \
3939                                                                            \
3940  product(intx, UnguardOnExecutionViolation, 0,                             \
3941          "Unguard page and retry on no-execute fault (Win32 only) "        \
3942          "0=off, 1=conservative, 2=aggressive")                            \
3943          range(0, 2)                                                       \
3944                                                                            \
3945  /* Serviceability Support */                                              \
3946                                                                            \
3947  product(bool, ManagementServer, false,                                    \
3948          "Create JMX Management Server")                                   \
3949                                                                            \
3950  product(bool, DisableAttachMechanism, false,                              \
3951          "Disable mechanism that allows tools to attach to this VM")       \
3952                                                                            \
3953  product(bool, StartAttachListener, false,                                 \
3954          "Always start Attach Listener at VM startup")                     \
3955                                                                            \
3956  manageable(bool, PrintConcurrentLocks, false,                             \
3957          "Print java.util.concurrent locks in thread dump")                \
3958                                                                            \
3959  product(bool, TransmitErrorReport, false,                                 \
3960          "Enable error report transmission on erroneous termination")      \
3961                                                                            \
3962  product(ccstr, ErrorReportServer, NULL,                                   \
3963          "Override built-in error report server address")                  \
3964                                                                            \
3965  /* Shared spaces */                                                       \
3966                                                                            \
3967  product(bool, UseSharedSpaces, true,                                      \
3968          "Use shared spaces for metadata")                                 \
3969                                                                            \
3970  product(bool, VerifySharedSpaces, false,                                  \
3971          "Verify shared spaces (false for default archive, true for "      \
3972          "archive specified by -XX:SharedArchiveFile)")                    \
3973                                                                            \
3974  product(bool, RequireSharedSpaces, false,                                 \
3975          "Require shared spaces for metadata")                             \
3976                                                                            \
3977  product(bool, DumpSharedSpaces, false,                                    \
3978          "Special mode: JVM reads a class list, loads classes, builds "    \
3979          "shared spaces, and dumps the shared spaces to a file to be "     \
3980          "used in future JVM runs")                                        \
3981                                                                            \
3982  product(bool, PrintSharedSpaces, false,                                   \
3983          "Print usage of shared spaces")                                   \
3984                                                                            \
3985  product(bool, PrintSharedArchiveAndExit, false,                           \
3986          "Print shared archive file contents")                             \
3987                                                                            \
3988  product(bool, PrintSharedDictionary, false,                               \
3989          "If PrintSharedArchiveAndExit is true, also print the shared "    \
3990          "dictionary")                                                     \
3991                                                                            \
3992  product(size_t, SharedReadWriteSize,  NOT_LP64(12*M) LP64_ONLY(16*M),     \
3993          "Size of read-write space for metadata (in bytes)")               \
3994                                                                            \
3995  product(size_t, SharedReadOnlySize,  NOT_LP64(12*M) LP64_ONLY(16*M),      \
3996          "Size of read-only space for metadata (in bytes)")                \
3997                                                                            \
3998  product(uintx, SharedMiscDataSize,    NOT_LP64(2*M) LP64_ONLY(4*M),       \
3999          "Size of the shared miscellaneous data area (in bytes)")          \
4000                                                                            \
4001  product(uintx, SharedMiscCodeSize,    120*K,                              \
4002          "Size of the shared miscellaneous code area (in bytes)")          \
4003                                                                            \
4004  product(uintx, SharedBaseAddress, LP64_ONLY(32*G)                         \
4005          NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)),                           \
4006          "Address to allocate shared memory region for class data")        \
4007                                                                            \
4008  product(uintx, SharedSymbolTableBucketSize, 4,                            \
4009          "Average number of symbols per bucket in shared table")           \
4010                                                                            \
4011  diagnostic(bool, IgnoreUnverifiableClassesDuringDump, false,              \
4012          "Do not quit -Xshare:dump even if we encounter unverifiable "     \
4013          "classes. Just exclude them from the shared dictionary.")         \
4014                                                                            \
4015  diagnostic(bool, PrintMethodHandleStubs, false,                           \
4016          "Print generated stub code for method handles")                   \
4017                                                                            \
4018  develop(bool, TraceMethodHandles, false,                                  \
4019          "trace internal method handle operations")                        \
4020                                                                            \
4021  diagnostic(bool, VerifyMethodHandles, trueInDebug,                        \
4022          "perform extra checks when constructing method handles")          \
4023                                                                            \
4024  diagnostic(bool, ShowHiddenFrames, false,                                 \
4025          "show method handle implementation frames (usually hidden)")      \
4026                                                                            \
4027  experimental(bool, TrustFinalNonStaticFields, false,                      \
4028          "trust final non-static declarations for constant folding")       \
4029                                                                            \
4030  diagnostic(bool, FoldStableValues, true,                                  \
4031          "Optimize loads from stable fields (marked w/ @Stable)")          \
4032                                                                            \
4033  develop(bool, TraceInvokeDynamic, false,                                  \
4034          "trace internal invoke dynamic operations")                       \
4035                                                                            \
4036  diagnostic(bool, PauseAtStartup,      false,                              \
4037          "Causes the VM to pause at startup time and wait for the pause "  \
4038          "file to be removed (default: ./vm.paused.<pid>)")                \
4039                                                                            \
4040  diagnostic(ccstr, PauseAtStartupFile, NULL,                               \
4041          "The file to create and for whose removal to await when pausing " \
4042          "at startup. (default: ./vm.paused.<pid>)")                       \
4043                                                                            \
4044  diagnostic(bool, PauseAtExit, false,                                      \
4045          "Pause and wait for keypress on exit if a debugger is attached")  \
4046                                                                            \
4047  product(bool, ExtendedDTraceProbes,    false,                             \
4048          "Enable performance-impacting dtrace probes")                     \
4049                                                                            \
4050  product(bool, DTraceMethodProbes, false,                                  \
4051          "Enable dtrace probes for method-entry and method-exit")          \
4052                                                                            \
4053  product(bool, DTraceAllocProbes, false,                                   \
4054          "Enable dtrace probes for object allocation")                     \
4055                                                                            \
4056  product(bool, DTraceMonitorProbes, false,                                 \
4057          "Enable dtrace probes for monitor events")                        \
4058                                                                            \
4059  product(bool, RelaxAccessControlCheck, false,                             \
4060          "Relax the access control checks in the verifier")                \
4061                                                                            \
4062  product(uintx, StringTableSize, defaultStringTableSize,                   \
4063          "Number of buckets in the interned String table")                 \
4064          range(minimumStringTableSize, 111*defaultStringTableSize)         \
4065                                                                            \
4066  experimental(uintx, SymbolTableSize, defaultSymbolTableSize,              \
4067          "Number of buckets in the JVM internal Symbol table")             \
4068          range(minimumSymbolTableSize, 111*defaultSymbolTableSize)         \
4069                                                                            \
4070  product(bool, UseStringDeduplication, false,                              \
4071          "Use string deduplication")                                       \
4072                                                                            \
4073  product(bool, PrintStringDeduplicationStatistics, false,                  \
4074          "Print string deduplication statistics")                          \
4075                                                                            \
4076  product(uintx, StringDeduplicationAgeThreshold, 3,                        \
4077          "A string must reach this age (or be promoted to an old region) " \
4078          "to be considered for deduplication")                             \
4079          range(1, markOopDesc::max_age)                                    \
4080                                                                            \
4081  diagnostic(bool, StringDeduplicationResizeALot, false,                    \
4082          "Force table resize every time the table is scanned")             \
4083                                                                            \
4084  diagnostic(bool, StringDeduplicationRehashALot, false,                    \
4085          "Force table rehash every time the table is scanned")             \
4086                                                                            \
4087  develop(bool, TraceDefaultMethods, false,                                 \
4088          "Trace the default method processing steps")                      \
4089                                                                            \
4090  diagnostic(bool, WhiteBoxAPI, false,                                      \
4091          "Enable internal testing APIs")                                   \
4092                                                                            \
4093  product(bool, PrintGCCause, true,                                         \
4094          "Include GC cause in GC logging")                                 \
4095                                                                            \
4096  experimental(intx, SurvivorAlignmentInBytes, 0,                           \
4097           "Default survivor space alignment in bytes")                     \
4098           constraint(SurvivorAlignmentInBytesConstraintFunc,AfterErgo)     \
4099                                                                            \
4100  product(bool , AllowNonVirtualCalls, false,                               \
4101          "Obey the ACC_SUPER flag and allow invokenonvirtual calls")       \
4102                                                                            \
4103  product(ccstr, DumpLoadedClassList, NULL,                                 \
4104          "Dump the names all loaded classes, that could be stored into "   \
4105          "the CDS archive, in the specified file")                         \
4106                                                                            \
4107  product(ccstr, SharedClassListFile, NULL,                                 \
4108          "Override the default CDS class list")                            \
4109                                                                            \
4110  diagnostic(ccstr, SharedArchiveFile, NULL,                                \
4111          "Override the default location of the CDS archive file")          \
4112                                                                            \
4113  product(ccstr, ExtraSharedClassListFile, NULL,                            \
4114          "Extra classlist for building the CDS archive file")              \
4115                                                                            \
4116  experimental(size_t, ArrayAllocatorMallocLimit,                           \
4117          SOLARIS_ONLY(64*K) NOT_SOLARIS((size_t)-1),                       \
4118          "Allocation less than this value will be allocated "              \
4119          "using malloc. Larger allocations will use mmap.")                \
4120                                                                            \
4121  experimental(bool, AlwaysAtomicAccesses, false,                           \
4122          "Accesses to all variables should always be atomic")              \
4123                                                                            \
4124  product(bool, EnableTracing, false,                                       \
4125          "Enable event-based tracing")                                     \
4126                                                                            \
4127  product(bool, UseLockedTracing, false,                                    \
4128          "Use locked-tracing when doing event-based tracing")              \
4129                                                                            \
4130  diagnostic(bool, UseUnalignedAccesses, false,                             \
4131          "Use unaligned memory accesses in sun.misc.Unsafe")               \
4132                                                                            \
4133  product_pd(bool, PreserveFramePointer,                                    \
4134             "Use the FP register for holding the frame pointer "           \
4135             "and not as a general purpose register.")                      \
4136                                                                            \
4137  diagnostic(bool, CheckIntrinsics, true,                                   \
4138             "When a class C is loaded, check that "                        \
4139             "(1) all intrinsics defined by the VM for class C are present "\
4140             "in the loaded class file and are marked with the "            \
4141             "@HotSpotIntrinsicCandidate annotation, that "                 \
4142             "(2) there is an intrinsic registered for all loaded methods " \
4143             "that are annotated with the @HotSpotIntrinsicCandidate "      \
4144             "annotation, and that "                                        \
4145             "(3) no orphan methods exist for class C (i.e., methods for "  \
4146             "which the VM declares an intrinsic but that are not declared "\
4147             "in the loaded class C. "                                      \
4148             "Check (3) is available only in debug builds.")
4149
4150/*
4151 *  Macros for factoring of globals
4152 */
4153
4154// Interface macros
4155#define DECLARE_PRODUCT_FLAG(type, name, value, doc)      extern "C" type name;
4156#define DECLARE_PD_PRODUCT_FLAG(type, name, doc)          extern "C" type name;
4157#define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc)   extern "C" type name;
4158#define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name;
4159#define DECLARE_MANAGEABLE_FLAG(type, name, value, doc)   extern "C" type name;
4160#define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc)   extern "C" type name;
4161#ifdef PRODUCT
4162#define DECLARE_DEVELOPER_FLAG(type, name, value, doc)    extern "C" type CONST_##name; const type name = value;
4163#define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)        extern "C" type CONST_##name; const type name = pd_##name;
4164#define DECLARE_NOTPRODUCT_FLAG(type, name, value, doc)   extern "C" type CONST_##name;
4165#else
4166#define DECLARE_DEVELOPER_FLAG(type, name, value, doc)    extern "C" type name;
4167#define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)        extern "C" type name;
4168#define DECLARE_NOTPRODUCT_FLAG(type, name, value, doc)   extern "C" type name;
4169#endif // PRODUCT
4170// Special LP64 flags, product only needed for now.
4171#ifdef _LP64
4172#define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
4173#else
4174#define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) const type name = value;
4175#endif // _LP64
4176
4177// Implementation macros
4178#define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc)      type name = value;
4179#define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc)          type name = pd_##name;
4180#define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc)   type name = value;
4181#define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
4182#define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc)   type name = value;
4183#define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc)   type name = value;
4184#ifdef PRODUCT
4185#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)    type CONST_##name = value;
4186#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)        type CONST_##name = pd_##name;
4187#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)   type CONST_##name = value;
4188#else
4189#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)    type name = value;
4190#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)        type name = pd_##name;
4191#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)   type name = value;
4192#endif // PRODUCT
4193#ifdef _LP64
4194#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value;
4195#else
4196#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */
4197#endif // _LP64
4198
4199// Only materialize src code for range checking when required, ignore otherwise
4200#define IGNORE_RANGE(a, b)
4201// Only materialize src code for contraint checking when required, ignore otherwise
4202#define IGNORE_CONSTRAINT(func,type)
4203
4204RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, \
4205              DECLARE_PD_DEVELOPER_FLAG, \
4206              DECLARE_PRODUCT_FLAG, \
4207              DECLARE_PD_PRODUCT_FLAG, \
4208              DECLARE_DIAGNOSTIC_FLAG, \
4209              DECLARE_EXPERIMENTAL_FLAG, \
4210              DECLARE_NOTPRODUCT_FLAG, \
4211              DECLARE_MANAGEABLE_FLAG, \
4212              DECLARE_PRODUCT_RW_FLAG, \
4213              DECLARE_LP64_PRODUCT_FLAG, \
4214              IGNORE_RANGE, \
4215              IGNORE_CONSTRAINT)
4216
4217RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, \
4218                 DECLARE_PD_DEVELOPER_FLAG, \
4219                 DECLARE_PRODUCT_FLAG, \
4220                 DECLARE_PD_PRODUCT_FLAG, \
4221                 DECLARE_DIAGNOSTIC_FLAG, \
4222                 DECLARE_NOTPRODUCT_FLAG, \
4223                 IGNORE_RANGE, \
4224                 IGNORE_CONSTRAINT)
4225
4226ARCH_FLAGS(DECLARE_DEVELOPER_FLAG, \
4227           DECLARE_PRODUCT_FLAG, \
4228           DECLARE_DIAGNOSTIC_FLAG, \
4229           DECLARE_EXPERIMENTAL_FLAG, \
4230           DECLARE_NOTPRODUCT_FLAG, \
4231           IGNORE_RANGE, \
4232           IGNORE_CONSTRAINT)
4233
4234// Extensions
4235
4236#include "runtime/globals_ext.hpp"
4237
4238#endif // SHARE_VM_RUNTIME_GLOBALS_HPP
4239