Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/heapRegion.hpp @ 2435:371bbc844bf1
7027766: G1: introduce flag to dump the liveness information per region at the end of marking
Summary: Repurpose the existing flag G1PrintRegionLivenessInfo to print out the liveness distribution across the regions in the heap at the end of marking.
Reviewed-by: iveresov, jwilhelm
author | tonyp |
---|---|
date | Mon, 04 Apr 2011 14:23:17 -0400 |
parents | abdfc822206f |
children | 063382f9b575 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Mon Apr 04 13:18:35 2011 -0400 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Mon Apr 04 14:23:17 2011 -0400 @@ -398,13 +398,16 @@ // The number of bytes marked live in the region in the last marking phase. size_t marked_bytes() { return _prev_marked_bytes; } + size_t live_bytes() { + return (top() - prev_top_at_mark_start()) * HeapWordSize + marked_bytes(); + } + // The number of bytes counted in the next marking. size_t next_marked_bytes() { return _next_marked_bytes; } // The number of bytes live wrt the next marking. size_t next_live_bytes() { - return (top() - next_top_at_mark_start()) - * HeapWordSize - + next_marked_bytes(); + return + (top() - next_top_at_mark_start()) * HeapWordSize + next_marked_bytes(); } // A lower bound on the amount of garbage bytes in the region.