< prev index next >

src/hotspot/share/gc/shared/gcArguments.cpp

Print this page
rev 48019 : 8191821: Finer granularity for GC verification
Reviewed-by:
rev 48020 : [mq]: 8191821-rev-sang-poonam

*** 23,32 **** --- 23,33 ---- */ #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,91 **** --- 83,98 ---- UNSUPPORTED_OPTION(UseConcMarkSweepGC); FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true); #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) { // Keeping the heap 100% free is hard ;-) so limit it to 99%. FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
*** 97,106 **** --- 104,131 ---- 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) { + 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"); select_gc();
< prev index next >