< prev index next >
src/share/vm/gc/parallel/psMarkSweep.cpp
Print this page
@@ -34,10 +34,11 @@
#include "gc/parallel/psScavenge.hpp"
#include "gc/parallel/psYoungGen.hpp"
#include "gc/serial/markSweep.hpp"
#include "gc/shared/gcCause.hpp"
#include "gc/shared/gcHeapSummary.hpp"
+#include "gc/shared/gcId.hpp"
#include "gc/shared/gcLocker.inline.hpp"
#include "gc/shared/gcTimer.hpp"
#include "gc/shared/gcTrace.hpp"
#include "gc/shared/gcTraceTime.hpp"
#include "gc/shared/isGCActiveMark.hpp"
@@ -111,10 +112,11 @@
}
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
GCCause::Cause gc_cause = heap->gc_cause();
+ GCIdMark gc_id_mark;
_gc_timer->register_gc_start();
_gc_tracer->report_gc_start(gc_cause, _gc_timer->gc_start());
PSAdaptiveSizePolicy* size_policy = heap->size_policy();
@@ -163,11 +165,11 @@
{
HandleMark hm;
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
- GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer->gc_id());
+ GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL);
TraceCollectorStats tcs(counters());
TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
if (TraceOldGenTime) accumulated_time()->start();
@@ -506,11 +508,11 @@
_objarray_stack.clear(true);
}
void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
// Recursively traverse all live objects and mark them
- GCTraceTime tm("phase 1", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
+ GCTraceTime tm("phase 1", PrintGCDetails && Verbose, true, _gc_timer);
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
// Need to clear claim bits before the tracing starts.
ClassLoaderDataGraph::clear_claimed_marks();
@@ -539,11 +541,11 @@
// Process reference objects found during marking
{
ref_processor()->setup_policy(clear_all_softrefs);
const ReferenceProcessorStats& stats =
ref_processor()->process_discovered_references(
- is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, _gc_timer, _gc_tracer->gc_id());
+ is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, _gc_timer);
gc_tracer()->report_gc_reference_stats(stats);
}
// This is the point where the entire marking should have completed.
assert(_marking_stack.is_empty(), "Marking should have completed");
@@ -565,11 +567,11 @@
_gc_tracer->report_object_count_after_gc(is_alive_closure());
}
void PSMarkSweep::mark_sweep_phase2() {
- GCTraceTime tm("phase 2", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
+ GCTraceTime tm("phase 2", PrintGCDetails && Verbose, true, _gc_timer);
// Now all live objects are marked, compute the new object addresses.
// It is not required that we traverse spaces in the same order in
// phase2, phase3 and phase4, but the ValidateMarkSweep live oops
@@ -592,11 +594,11 @@
};
static PSAlwaysTrueClosure always_true;
void PSMarkSweep::mark_sweep_phase3() {
// Adjust the pointers to reflect the new locations
- GCTraceTime tm("phase 3", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
+ GCTraceTime tm("phase 3", PrintGCDetails && Verbose, true, _gc_timer);
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
PSYoungGen* young_gen = heap->young_gen();
PSOldGen* old_gen = heap->old_gen();
@@ -632,11 +634,11 @@
old_gen->adjust_pointers();
}
void PSMarkSweep::mark_sweep_phase4() {
EventMark m("4 compact heap");
- GCTraceTime tm("phase 4", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
+ GCTraceTime tm("phase 4", PrintGCDetails && Verbose, true, _gc_timer);
// All pointers are now adjusted, move objects accordingly
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
PSYoungGen* young_gen = heap->young_gen();
< prev index next >