< prev index next >
src/hotspot/share/gc/shared/gcArguments.cpp
Print this page
rev 48019 : 8191821: Finer granularity for GC verification
Reviewed-by:
@@ -23,10 +23,11 @@
*/
#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"
#include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
@@ -82,10 +83,14 @@
UNSUPPORTED_OPTION(UseConcMarkSweepGC);
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
#endif // INCLUDE_ALL_GCS
}
+void GCArguments::parse_verification_type(const char* type) {
+ log_warning(gc, verify)("VerifyGCType is not supported by this collector.");
+}
+
void GCArguments::initialize_flags() {
#if INCLUDE_ALL_GCS
if (MinHeapFreeRatio == 100) {
// Keeping the heap 100% free is hard ;-) so limit it to 99%.
FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
@@ -97,10 +102,25 @@
FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
}
#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) {
+ parse_verification_type(token);
+ token = strtok(NULL, delimiter);
+ }
+ FREE_C_HEAP_ARRAY(char, type_list);
+ }
+}
+
jint GCArguments::initialize() {
assert(!is_initialized(), "GC arguments already initialized");
select_gc();
< prev index next >