< prev index next >
src/hotspot/share/gc/shared/gcArguments.cpp
Print this page
rev 52613 : webrev.01
@@ -26,10 +26,11 @@
#include "precompiled.hpp"
#include "gc/shared/gcArguments.hpp"
#include "runtime/arguments.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
+#include "utilities/defaultStream.hpp"
#include "utilities/macros.hpp"
void GCArguments::initialize() {
if (FullGCALot && FLAG_IS_DEFAULT(MarkSweepAlwaysCompactCount)) {
MarkSweepAlwaysCompactCount = 1; // Move objects every gc.
@@ -52,5 +53,20 @@
if (!ClassUnloading) {
// If class unloading is disabled, also disable concurrent class unloading.
FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
}
}
+
+bool GCArguments::check_args_consistency() {
+ bool status = true;
+ 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;
+ }
+ return status;
+}
< prev index next >