src/share/vm/runtime/arguments.hpp
Print this page
@@ -219,10 +219,21 @@
arg_too_big = -1,
arg_in_range = 0
};
private:
+ // should ergenomics be applied to the ClassMetaspaceSize?
+ static bool apply_ergonomics_on_classmetaspacesize();
+
+ // Value of the ergonomically determined ClassMetaspaceSize
+ // 100,000 classes seems like a good size, so 100M assumes around 1K
+ // per klass. The vtable and oopMap is embedded so we don't have a fixed
+ // size per klass. Eventually, this will be parameterized because it
+ // would also be useful to determine the optimal size of the
+ // systemDictionary.
+ // Round up to a power of two to avoid losses due to alignment.
+ static const size_t ErgoClassMetaspaceSize = 128 * M;
// an array containing all flags specified in the .hotspotrc file
static char** _jvm_flags_array;
static int _num_jvm_flags;
// an array containing all jvm arguments specified in the command line
@@ -262,10 +273,13 @@
// Option flags
static bool _has_profile;
static bool _has_alloc_profile;
static const char* _gc_log_filename;
+ // computed value for the maximum heap alignment
+ static size_t _max_heap_alignment;
+
static uintx _min_heap_size;
// -Xrun arguments
static AgentLibraryList _libraryList;
static void add_init_library(const char* name, char* options)
@@ -307,10 +321,11 @@
// UseParallel[Old]GC
static void set_parallel_gc_flags();
// Garbage-First (UseG1GC)
static void set_g1_gc_flags();
// GC ergonomics
+ static void set_max_heap_alignment();
static void set_use_compressed_oops();
static void set_ergonomics_flags();
static void set_shared_spaces_flags();
// limits the given memory size by the maximum amount of memory this process is
// currently allowed to allocate or reserve.
@@ -424,10 +439,14 @@
// Check stack pages settings
static bool check_stack_pages();
// Used by os_solaris
static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
+ static size_t max_heap_alignment() { return _max_heap_alignment; }
+ // return the maximum size a heap with compressed oops can take
+ static size_t max_heap_for_compressed_oops();
+
// return a char* array containing all options
static char** jvm_flags_array() { return _jvm_flags_array; }
static char** jvm_args_array() { return _jvm_args_array; }
static int num_jvm_flags() { return _num_jvm_flags; }
static int num_jvm_args() { return _num_jvm_args; }