--- a/src/hotspot/share/gc/shared/gcArguments.cpp Fri Dec 01 11:40:39 2017 +0530
+++ b/src/hotspot/share/gc/shared/gcArguments.cpp Fri Dec 01 08:56:22 2017 +0100
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/serial/serialArguments.hpp"
+#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "runtime/arguments.hpp"
#include "runtime/globals.hpp"
@@ -84,6 +85,12 @@
#endif // INCLUDE_ALL_GCS
}
+bool GCArguments::parse_verification_type(const char* type) {
+ log_warning(gc, verify)("VerifyGCType is not supported by this collector.");
+ // Return false to avoid multiple warnings.
+ return false;
+}
+
void GCArguments::initialize_flags() {
#if INCLUDE_ALL_GCS
if (MinHeapFreeRatio == 100) {
@@ -99,6 +106,24 @@
#endif // INCLUDE_ALL_GCS
}
+void GCArguments::post_heap_initialize() {
+ if (strlen(VerifyGCType) > 0) {
+ const char delimiter[] = " ,\n";
+ size_t length = strlen(VerifyGCType);
+ char* type_list = NEW_C_HEAP_ARRAY(char, length + 1, mtInternal);
+ strncpy(type_list, VerifyGCType, length + 1);
+ char* token = strtok(type_list, delimiter);
+ while (token != NULL) {
+ bool success = parse_verification_type(token);
+ if (!success) {
+ break;
+ }
+ token = strtok(NULL, delimiter);
+ }
+ FREE_C_HEAP_ARRAY(char, type_list);
+ }
+}
+
jint GCArguments::initialize() {
assert(!is_initialized(), "GC arguments already initialized");