src/share/vm/memory/universe.cpp

Print this page

        

*** 1101,1110 **** --- 1101,1121 ---- ResourceMark rm; heap()->print_on(log.trace_stream()); } } + bool Universe::should_verify_subset(const char* subset) { + if (VerifySubSet == NULL || VerifySubSet[0] == '\0') { + // VerifySubSet is not specified, verify everything + return true; + } + if (strstr(VerifySubSet, subset)) { + return true; + } + return false; + } + void Universe::verify(VerifyOption option, const char* prefix) { // The use of _verify_in_progress is a temporary work around for // 6320749. Don't bother with a creating a class to set and clear // it since it is only used in this method and the control flow is // straight forward.
*** 1120,1156 **** --- 1131,1189 ---- HandleMark hm; // Handles created during verification can be zapped _verify_count++; FormatBuffer<> title("Verifying %s", prefix); GCTraceTime(Info, gc, verify) tm(title.buffer()); + if (should_verify_subset("threads")) { log_debug(gc, verify)("Threads"); Threads::verify(); + } + if (should_verify_subset("heap")) { log_debug(gc, verify)("Heap"); heap()->verify(option); + } + if (should_verify_subset("symbol_table")) { log_debug(gc, verify)("SymbolTable"); SymbolTable::verify(); + } + if (should_verify_subset("string_table")) { log_debug(gc, verify)("StringTable"); StringTable::verify(); + } + if (should_verify_subset("codecache")) { { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); log_debug(gc, verify)("CodeCache"); CodeCache::verify(); } + } + if (should_verify_subset("dictionary")) { log_debug(gc, verify)("SystemDictionary"); SystemDictionary::verify(); + } #ifndef PRODUCT + if (should_verify_subset("classloader_data_graph")) { log_debug(gc, verify)("ClassLoaderDataGraph"); ClassLoaderDataGraph::verify(); + } #endif + if (should_verify_subset("metaspace")) { log_debug(gc, verify)("MetaspaceAux"); MetaspaceAux::verify_free_chunks(); + } + if (should_verify_subset("jni_handles")) { log_debug(gc, verify)("JNIHandles"); JNIHandles::verify(); + } + if (should_verify_subset("c-heap")) { log_debug(gc, verify)("C-heap"); os::check_heap(); + } + if (should_verify_subset("codecache_oops")) { log_debug(gc, verify)("CodeCache Oops"); CodeCache::verify_oops(); + } _verify_in_progress = false; }