--- old/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2019-03-21 15:28:17.214555097 +0800 +++ new/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2019-03-21 15:28:17.063559438 +0800 @@ -349,20 +349,20 @@ } } -// void visit(const G1HeapSummary* g1_heap_summary) const { -// visit((GCHeapSummary*)g1_heap_summary); -// -// EventG1HeapSummary e; -// if (e.should_commit()) { -// e.set_gcId(_shared_gc_info.gc_id().id()); -// e.set_when((u1)_when); -// e.set_edenUsedSize(g1_heap_summary->edenUsed()); -// e.set_edenTotalSize(g1_heap_summary->edenCapacity()); -// e.set_survivorUsedSize(g1_heap_summary->survivorUsed()); -// e.set_numberOfRegions(g1_heap_summary->numberOfRegions()); -// e.commit(); -// } -// } + void visit(const G1HeapSummary* g1_heap_summary) const { + visit((GCHeapSummary*)g1_heap_summary); + + EventG1HeapSummary e; + if (e.should_commit()) { + e.set_gcId(_gc_id.id()); + e.set_when((u1)_when); + e.set_edenUsedSize(g1_heap_summary->edenUsed()); + e.set_edenTotalSize(g1_heap_summary->edenCapacity()); + e.set_survivorUsedSize(g1_heap_summary->survivorUsed()); + e.set_numberOfRegions(g1_heap_summary->numberOfRegions()); + e.commit(); + } + } void visit(const PSHeapSummary* ps_heap_summary) const { visit((GCHeapSummary*)ps_heap_summary);