8010722: assert: failed: heap size is too big for compressed oops

Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation.

Reviewed-by: stefank, dholmes
This commit is contained in:
Thomas Schatzl 2013-09-11 16:25:02 +02:00
parent 6b12e05140
commit 962008f22b
22 changed files with 363 additions and 42 deletions

View file

@ -280,6 +280,9 @@ class Arguments : AllStatic {
// Option flags
static bool _has_profile;
static const char* _gc_log_filename;
// Value of the conservative maximum heap alignment needed
static size_t _conservative_max_heap_alignment;
static uintx _min_heap_size;
// -Xrun arguments
@ -327,6 +330,7 @@ class Arguments : AllStatic {
// Garbage-First (UseG1GC)
static void set_g1_gc_flags();
// GC ergonomics
static void set_conservative_max_heap_alignment();
static void set_use_compressed_oops();
static void set_use_compressed_klass_ptrs();
static void set_ergonomics_flags();
@ -430,8 +434,10 @@ class Arguments : AllStatic {
static char* SharedArchivePath;
public:
// Parses the arguments
// Parses the arguments, first phase
static jint parse(const JavaVMInitArgs* args);
// Apply ergonomics
static jint apply_ergo();
// Adjusts the arguments after the OS have adjusted the arguments
static jint adjust_after_os();
// Check for consistency in the selection of the garbage collector.
@ -445,6 +451,10 @@ class Arguments : AllStatic {
// Used by os_solaris
static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
static size_t conservative_max_heap_alignment() { return _conservative_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; }