Mercurial > hg > truffle
diff src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp @ 3775:f75137faa7fe
6916968: CMS: freeList.cpp:304 assert(_allocation_stats.prevSweep() + ..., "Conservation Principle")
Summary: Fix assert and adjust demand volume computation by adding missing factor.
Reviewed-by: jmasa, tonyp
author | ysr |
---|---|
date | Mon, 20 Jun 2011 09:42:26 -0700 |
parents | f95d63e2154a |
children |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp Thu Jun 16 15:51:57 2011 -0400 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp Mon Jun 20 09:42:26 2011 -0700 @@ -300,8 +300,21 @@ // dictionary for example, this might be the first block and // in that case there would be no place that we could record // the stats (which are kept in the block itself). - assert(_allocation_stats.prevSweep() + _allocation_stats.splitBirths() + 1 // Total Stock + 1 - >= _allocation_stats.splitDeaths() + (ssize_t)count(), "Conservation Principle"); + assert((_allocation_stats.prevSweep() + _allocation_stats.splitBirths() + + _allocation_stats.coalBirths() + 1) // Total Production Stock + 1 + >= (_allocation_stats.splitDeaths() + _allocation_stats.coalDeaths() + + (ssize_t)count()), // Total Current Stock + depletion + err_msg("FreeList " PTR_FORMAT " of size " SIZE_FORMAT + " violates Conservation Principle: " + "prevSweep(" SIZE_FORMAT ")" + " + splitBirths(" SIZE_FORMAT ")" + " + coalBirths(" SIZE_FORMAT ") + 1 >= " + " splitDeaths(" SIZE_FORMAT ")" + " coalDeaths(" SIZE_FORMAT ")" + " + count(" SSIZE_FORMAT ")", + this, _size, _allocation_stats.prevSweep(), _allocation_stats.splitBirths(), + _allocation_stats.splitBirths(), _allocation_stats.splitDeaths(), + _allocation_stats.coalDeaths(), count())); } void FreeList::assert_proper_lock_protection_work() const {