8068314: "Java fields that are currently set during shared space dumping" comment is incorrect

CDS dump time should also initialize preallocated out_of_memory error messages.

Reviewed-by: iklam, hseigel
This commit is contained in:
Jiangli Zhou 2017-09-27 17:55:20 -04:00
parent 52c73dd8a9
commit 92ad2630a1

View File

@ -1064,9 +1064,6 @@ bool universe_post_init() {
Universe::_vm_exception = InstanceKlass::cast(k)->allocate_instance(CHECK_false);
if (!DumpSharedSpaces) {
// These are the only Java fields that are currently set during shared space dumping.
// We prefer to not handle this generally, so we always reinitialize these detail messages.
Handle msg = java_lang_String::create_from_str("Java heap space", CHECK_false);
java_lang_Throwable::set_message(Universe::_out_of_memory_error_java_heap, msg());
@ -1101,7 +1098,6 @@ bool universe_post_init() {
Universe::preallocated_out_of_memory_errors()->obj_at_put(i, err_h());
}
Universe::_preallocated_out_of_memory_error_avail_count = (jint)len;
}
Universe::initialize_known_methods(CHECK_false);