--- old/src/hotspot/share/runtime/arguments.cpp 2018-11-19 17:22:35.208170400 -0800 +++ new/src/hotspot/share/runtime/arguments.cpp 2018-11-19 17:22:34.274073200 -0800 @@ -1622,6 +1622,10 @@ } void Arguments::set_use_compressed_oops() { +if (AllocateOldGenAt != NULL) { + FLAG_SET_ERGO(bool, UseCompressedOops, false); + return; +} #ifndef ZERO #ifdef _LP64 // MaxHeapSize is not set up properly at this point, but @@ -2063,17 +2067,7 @@ } } - if(!FLAG_IS_DEFAULT(AllocateHeapAt) && !FLAG_IS_DEFAULT(AllocateOldGenAt)) { - jio_fprintf(defaultStream::error_stream(), - "AllocateHeapAt and AllocateOldGenAt cannot be used together.\n"); - status = false; - } - - if (!FLAG_IS_DEFAULT(AllocateOldGenAt) && (UseSerialGC || UseConcMarkSweepGC || UseEpsilonGC || UseZGC)) { - jio_fprintf(defaultStream::error_stream(), - "AllocateOldGenAt not supported for selected GC.\n"); - status = false; - } + status = status && GCArguments::check_args_consistency(); return status; }