< prev index next >
src/hotspot/share/gc/shared/gcArguments.cpp
Print this page
rev 48019 : 8191821: Finer granularity for GC verification
Reviewed-by:
*** 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,96 ----
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,106 ****
--- 102,126 ----
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 >