< prev index next >

src/share/vm/gc/cms/adaptiveFreeList.cpp

Print this page




 116   if (record_return) {
 117     increment_returned_bytes_by(size()*HeapWordSize);
 118   }
 119 #endif
 120 }
 121 
 122 #ifndef PRODUCT
 123 template <class Chunk>
 124 void AdaptiveFreeList<Chunk>::verify_stats() const {
 125   // The +1 of the LH comparand is to allow some "looseness" in
 126   // checking: we usually call this interface when adding a block
 127   // and we'll subsequently update the stats; we cannot update the
 128   // stats beforehand because in the case of the large-block BT
 129   // dictionary for example, this might be the first block and
 130   // in that case there would be no place that we could record
 131   // the stats (which are kept in the block itself).
 132   assert((_allocation_stats.prev_sweep() + _allocation_stats.split_births()
 133           + _allocation_stats.coal_births() + 1)   // Total Production Stock + 1
 134          >= (_allocation_stats.split_deaths() + _allocation_stats.coal_deaths()
 135              + (ssize_t)count()),                // Total Current Stock + depletion
 136          err_msg("FreeList " PTR_FORMAT " of size " SIZE_FORMAT
 137                  " violates Conservation Principle: "
 138                  "prev_sweep(" SIZE_FORMAT ")"
 139                  " + split_births(" SIZE_FORMAT ")"
 140                  " + coal_births(" SIZE_FORMAT ") + 1 >= "
 141                  " split_deaths(" SIZE_FORMAT ")"
 142                  " coal_deaths(" SIZE_FORMAT ")"
 143                  " + count(" SSIZE_FORMAT ")",
 144                  p2i(this), size(), _allocation_stats.prev_sweep(), _allocation_stats.split_births(),
 145                  _allocation_stats.coal_births(), _allocation_stats.split_deaths(),
 146                  _allocation_stats.coal_deaths(), count()));
 147 }
 148 #endif
 149 
 150 // Needs to be after the definitions have been seen.
 151 template class AdaptiveFreeList<FreeChunk>;


 116   if (record_return) {
 117     increment_returned_bytes_by(size()*HeapWordSize);
 118   }
 119 #endif
 120 }
 121 
 122 #ifndef PRODUCT
 123 template <class Chunk>
 124 void AdaptiveFreeList<Chunk>::verify_stats() const {
 125   // The +1 of the LH comparand is to allow some "looseness" in
 126   // checking: we usually call this interface when adding a block
 127   // and we'll subsequently update the stats; we cannot update the
 128   // stats beforehand because in the case of the large-block BT
 129   // dictionary for example, this might be the first block and
 130   // in that case there would be no place that we could record
 131   // the stats (which are kept in the block itself).
 132   assert((_allocation_stats.prev_sweep() + _allocation_stats.split_births()
 133           + _allocation_stats.coal_births() + 1)   // Total Production Stock + 1
 134          >= (_allocation_stats.split_deaths() + _allocation_stats.coal_deaths()
 135              + (ssize_t)count()),                // Total Current Stock + depletion
 136          "FreeList " PTR_FORMAT " of size " SIZE_FORMAT
 137          " violates Conservation Principle: "
 138          "prev_sweep(" SIZE_FORMAT ")"
 139          " + split_births(" SIZE_FORMAT ")"
 140          " + coal_births(" SIZE_FORMAT ") + 1 >= "
 141          " split_deaths(" SIZE_FORMAT ")"
 142          " coal_deaths(" SIZE_FORMAT ")"
 143          " + count(" SSIZE_FORMAT ")",
 144          p2i(this), size(), _allocation_stats.prev_sweep(), _allocation_stats.split_births(),
 145          _allocation_stats.coal_births(), _allocation_stats.split_deaths(),
 146          _allocation_stats.coal_deaths(), count());
 147 }
 148 #endif
 149 
 150 // Needs to be after the definitions have been seen.
 151 template class AdaptiveFreeList<FreeChunk>;
< prev index next >