--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -4050,14 +4050,10 @@
void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
bool process_strings, bool process_symbols) {
- {
+ { // Timing scope
G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
workers()->run_task(&g1_unlink_task);
}
-
- if (G1StringDedup::is_enabled()) {
- G1StringDedup::unlink(is_alive);
- }
}
class G1RedirtyLoggedCardsTask : public AbstractGangTask {
--- a/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -154,17 +154,29 @@
// This is the point where the entire marking should have completed.
assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed");
- // Unload classes and purge the SystemDictionary.
- bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive);
+ {
+ GCTraceTime(Debug, gc) trace("Class Unloading", gc_timer());
- // Unload nmethods.
- CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class);
+ // Unload classes and purge the SystemDictionary.
+ bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive);
+
+ // Unload nmethods.
+ CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class);
- // Prune dead klasses from subklass/sibling/implementor lists.
- Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
+ // Prune dead klasses from subklass/sibling/implementor lists.
+ Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
+ }
- // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
- g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
+ {
+ GCTraceTime(Debug, gc) trace("Scrub String and Symbol Tables", gc_timer());
+ // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
+ g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
+ }
+
+ if (G1StringDedup::is_enabled()) {
+ GCTraceTime(Debug, gc) trace("String Deduplication Unlink", gc_timer());
+ G1StringDedup::unlink(&GenMarkSweep::is_alive);
+ }
if (VerifyDuringGC) {
HandleMark hm; // handle scope
--- a/hotspot/src/share/vm/gc/parallel/psMarkSweep.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/gc/parallel/psMarkSweep.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -533,20 +533,31 @@
// This is the point where the entire marking should have completed.
assert(_marking_stack.is_empty(), "Marking should have completed");
- // Unload classes and purge the SystemDictionary.
- bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
+ {
+ GCTraceTime(Debug, gc) t("Class Unloading", _gc_timer);
+
+ // Unload classes and purge the SystemDictionary.
+ bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
- // Unload nmethods.
- CodeCache::do_unloading(is_alive_closure(), purged_class);
+ // Unload nmethods.
+ CodeCache::do_unloading(is_alive_closure(), purged_class);
+
+ // Prune dead klasses from subklass/sibling/implementor lists.
+ Klass::clean_weak_klass_links(is_alive_closure());
+ }
- // Prune dead klasses from subklass/sibling/implementor lists.
- Klass::clean_weak_klass_links(is_alive_closure());
+ {
+ GCTraceTime(Debug, gc) t("Scrub String Table", _gc_timer);
+ // Delete entries for dead interned strings.
+ StringTable::unlink(is_alive_closure());
+ }
- // Delete entries for dead interned strings.
- StringTable::unlink(is_alive_closure());
+ {
+ GCTraceTime(Debug, gc) t("Scrub Symbol Table", _gc_timer);
+ // Clean up unreferenced symbols in symbol table.
+ SymbolTable::unlink();
+ }
- // Clean up unreferenced symbols in symbol table.
- SymbolTable::unlink();
_gc_tracer->report_object_count_after_gc(is_alive_closure());
}
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -2103,25 +2103,34 @@
gc_tracer->report_gc_reference_stats(stats);
}
- GCTraceTime(Trace, gc) tm_m("Class Unloading", &_gc_timer);
-
// This is the point where the entire marking should have completed.
assert(cm->marking_stacks_empty(), "Marking should have completed");
- // Follow system dictionary roots and unload classes.
- bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
-
- // Unload nmethods.
- CodeCache::do_unloading(is_alive_closure(), purged_class);
-
- // Prune dead klasses from subklass/sibling/implementor lists.
- Klass::clean_weak_klass_links(is_alive_closure());
-
- // Delete entries for dead interned strings.
- StringTable::unlink(is_alive_closure());
-
- // Clean up unreferenced symbols in symbol table.
- SymbolTable::unlink();
+ {
+ GCTraceTime(Debug, gc) tm_m("Class Unloading", &_gc_timer);
+
+ // Follow system dictionary roots and unload classes.
+ bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
+
+ // Unload nmethods.
+ CodeCache::do_unloading(is_alive_closure(), purged_class);
+
+ // Prune dead klasses from subklass/sibling/implementor lists.
+ Klass::clean_weak_klass_links(is_alive_closure());
+ }
+
+ {
+ GCTraceTime(Debug, gc) t("Scrub String Table", &_gc_timer);
+ // Delete entries for dead interned strings.
+ StringTable::unlink(is_alive_closure());
+ }
+
+ {
+ GCTraceTime(Debug, gc) t("Scrub Symbol Table", &_gc_timer);
+ // Clean up unreferenced symbols in symbol table.
+ SymbolTable::unlink();
+ }
+
_gc_tracer.report_object_count_after_gc(is_alive_closure());
}
--- a/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -218,20 +218,30 @@
// This is the point where the entire marking should have completed.
assert(_marking_stack.is_empty(), "Marking should have completed");
- // Unload classes and purge the SystemDictionary.
- bool purged_class = SystemDictionary::do_unloading(&is_alive);
+ {
+ GCTraceTime(Debug, gc) tm_m("Class Unloading", gc_timer());
- // Unload nmethods.
- CodeCache::do_unloading(&is_alive, purged_class);
+ // Unload classes and purge the SystemDictionary.
+ bool purged_class = SystemDictionary::do_unloading(&is_alive);
+
+ // Unload nmethods.
+ CodeCache::do_unloading(&is_alive, purged_class);
- // Prune dead klasses from subklass/sibling/implementor lists.
- Klass::clean_weak_klass_links(&is_alive);
+ // Prune dead klasses from subklass/sibling/implementor lists.
+ Klass::clean_weak_klass_links(&is_alive);
+ }
- // Delete entries for dead interned strings.
- StringTable::unlink(&is_alive);
+ {
+ GCTraceTime(Debug, gc) t("Scrub String Table", gc_timer());
+ // Delete entries for dead interned strings.
+ StringTable::unlink(&is_alive);
+ }
- // Clean up unreferenced symbols in symbol table.
- SymbolTable::unlink();
+ {
+ GCTraceTime(Debug, gc) t("Scrub Symbol Table", gc_timer());
+ // Clean up unreferenced symbols in symbol table.
+ SymbolTable::unlink();
+ }
gc_tracer()->report_object_count_after_gc(&is_alive);
}
--- a/hotspot/src/share/vm/memory/metaspace.cpp Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Fri Mar 18 03:46:02 2016 +0100
@@ -759,7 +759,6 @@
void verify();
void verify_chunk_size(Metachunk* chunk);
- NOT_PRODUCT(void mangle_freed_chunks();)
#ifdef ASSERT
void verify_allocated_blocks_words();
#endif
@@ -2519,20 +2518,6 @@
" waste " SIZE_FORMAT, curr_total, used, free, capacity, waste);
}
-#ifndef PRODUCT
-void SpaceManager::mangle_freed_chunks() {
- for (ChunkIndex index = ZeroIndex;
- index < NumberOfInUseLists;
- index = next_chunk_index(index)) {
- for (Metachunk* curr = chunks_in_use(index);
- curr != NULL;
- curr = curr->next()) {
- curr->mangle();
- }
- }
-}
-#endif // PRODUCT
-
// MetaspaceAux
--- a/hotspot/src/share/vm/trace/traceevents.xml Fri Mar 18 01:14:39 2016 +0000
+++ b/hotspot/src/share/vm/trace/traceevents.xml Fri Mar 18 03:46:02 2016 +0100
@@ -436,27 +436,27 @@
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
</event>
- <event id="GCPhasePause" path="vm/gc/phases/pause" label="GC Phase Pause">
+ <event id="GCPhasePause" path="vm/gc/phases/pause" label="GC Phase Pause" has_thread="true">
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
<value type="UTF8" field="name" label="Name" />
</event>
- <event id="GCPhasePauseLevel1" path="vm/gc/phases/pause_level_1" label="GC Phase Pause Level 1">
+ <event id="GCPhasePauseLevel1" path="vm/gc/phases/pause_level_1" label="GC Phase Pause Level 1" has_thread="true">
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
<value type="UTF8" field="name" label="Name" />
</event>
- <event id="GCPhasePauseLevel2" path="vm/gc/phases/pause_level_2" label="GC Phase Pause Level 2">
+ <event id="GCPhasePauseLevel2" path="vm/gc/phases/pause_level_2" label="GC Phase Pause Level 2" has_thread="true">
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
<value type="UTF8" field="name" label="Name" />
</event>
- <event id="GCPhasePauseLevel3" path="vm/gc/phases/pause_level_3" label="GC Phase Pause Level 3">
+ <event id="GCPhasePauseLevel3" path="vm/gc/phases/pause_level_3" label="GC Phase Pause Level 3" has_thread="true">
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
<value type="UTF8" field="name" label="Name" />
</event>
- <event id="GCPhaseConcurrent" path="vm/gc/phases/concurrent" label="GC Phase Concurrent">
+ <event id="GCPhaseConcurrent" path="vm/gc/phases/concurrent" label="GC Phase Concurrent" has_thread="true">
<value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
<value type="UTF8" field="name" label="Name" />
</event>