8226462: [TESTBUG] runtime/appcds/sharedStrings/SysDictCrash.java failed with Cannot dump shared archive

Add a CDS log statement in arguments.cpp. The test catches RuntimeException duing dumping and checks if the log statement is in the stdout.

Reviewed-by: iklam, dholmes
This commit is contained in:
Calvin Cheung 2019-06-25 09:41:03 -07:00
parent 5629241827
commit 5c5126f5ee
2 changed files with 21 additions and 2 deletions

View file

@ -1815,6 +1815,10 @@ void Arguments::set_heap_size() {
// was not specified.
if (reasonable_max > max_coop_heap) {
if (FLAG_IS_ERGO(UseCompressedOops) && override_coop_limit) {
log_info(cds)("UseCompressedOops and UseCompressedClassPointers have been disabled due to"
" max heap " SIZE_FORMAT " > compressed oop heap " SIZE_FORMAT ". "
"Please check the setting of MaxRAMPercentage %5.2f."
,(size_t)reasonable_max, (size_t)max_coop_heap, MaxRAMPercentage);
FLAG_SET_ERGO(UseCompressedOops, false);
FLAG_SET_ERGO(UseCompressedClassPointers, false);
} else {