--- old/src/share/vm/runtime/arguments.hpp 2013-06-04 17:03:30.967740831 +0200 +++ new/src/share/vm/runtime/arguments.hpp 2013-06-04 17:03:30.827740827 +0200 @@ -221,6 +221,17 @@ }; 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; @@ -264,6 +275,9 @@ 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 @@ -309,6 +323,7 @@ // 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(); @@ -426,6 +441,10 @@ // 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; }