7072527: CMS: JMM GC counters overcount in some cases

Avoid overcounting when CMS has concurrent mode failure.

Reviewed-by: ysr
This commit is contained in:
Krystal Mok 2011-08-02 14:37:35 +01:00 committed by Kevin Walls
parent abe5e3a903
commit 24e8905fdf
3 changed files with 95 additions and 16 deletions

View file

@ -2025,9 +2025,6 @@ void CMSCollector::do_compaction_work(bool clear_all_soft_refs) {
_intra_sweep_estimate.padded_average());
}
{
TraceCMSMemoryManagerStats tmms(gch->gc_cause());
}
GenMarkSweep::invoke_at_safepoint(_cmsGen->level(),
ref_processor(), clear_all_soft_refs);
#ifdef ASSERT
@ -9345,15 +9342,3 @@ TraceCMSMemoryManagerStats::TraceCMSMemoryManagerStats(CMSCollector::CollectorSt
}
}
// when bailing out of cms in concurrent mode failure
TraceCMSMemoryManagerStats::TraceCMSMemoryManagerStats(GCCause::Cause cause): TraceMemoryManagerStats() {
initialize(true /* fullGC */ ,
cause /* cause of the GC */,
true /* recordGCBeginTime */,
true /* recordPreGCUsage */,
true /* recordPeakUsage */,
true /* recordPostGCusage */,
true /* recordAccumulatedGCTime */,
true /* recordGCEndTime */,
true /* countCollection */ );
}