8193266: AArch64: TestOptionsWithRanges.java SIGSEGV

Fix hotspot jtreg test runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java failure on AArch64.

Reviewed-by: aph, coleenp, dsamersoff
This commit is contained in:
Stuart Monteith 2018-03-20 22:54:02 +08:00
parent 221d0f4c54
commit 502b9b1da4
4 changed files with 14 additions and 4 deletions

View file

@ -234,6 +234,7 @@ void MetaspaceShared::initialize_runtime_shared_and_meta_spaces() {
// with the archived ones, so it must be done after all encodings are determined.
mapinfo->map_heap_regions();
}
Universe::set_narrow_klass_range(CompressedClassSpaceSize);
#endif // _LP64
} else {
assert(!mapinfo->is_open() && !UseSharedSpaces,
@ -299,6 +300,8 @@ void MetaspaceShared::initialize_dumptime_shared_and_meta_spaces() {
// Set narrow_klass_shift to be LogKlassAlignmentInBytes. This is consistent
// with AOT.
Universe::set_narrow_klass_shift(LogKlassAlignmentInBytes);
// Set the range of klass addresses to 4GB.
Universe::set_narrow_klass_range(cds_total);
Metaspace::initialize_class_space(tmp_class_space);
tty->print_cr("narrow_klass_base = " PTR_FORMAT ", narrow_klass_shift = %d",