Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
2434:c84ee870e0b9 | 2435:371bbc844bf1 |
---|---|
396 int hrs_index() const { return _hrs_index; } | 396 int hrs_index() const { return _hrs_index; } |
397 void set_hrs_index(int index) { _hrs_index = index; } | 397 void set_hrs_index(int index) { _hrs_index = index; } |
398 | 398 |
399 // The number of bytes marked live in the region in the last marking phase. | 399 // The number of bytes marked live in the region in the last marking phase. |
400 size_t marked_bytes() { return _prev_marked_bytes; } | 400 size_t marked_bytes() { return _prev_marked_bytes; } |
401 size_t live_bytes() { | |
402 return (top() - prev_top_at_mark_start()) * HeapWordSize + marked_bytes(); | |
403 } | |
404 | |
401 // The number of bytes counted in the next marking. | 405 // The number of bytes counted in the next marking. |
402 size_t next_marked_bytes() { return _next_marked_bytes; } | 406 size_t next_marked_bytes() { return _next_marked_bytes; } |
403 // The number of bytes live wrt the next marking. | 407 // The number of bytes live wrt the next marking. |
404 size_t next_live_bytes() { | 408 size_t next_live_bytes() { |
405 return (top() - next_top_at_mark_start()) | 409 return |
406 * HeapWordSize | 410 (top() - next_top_at_mark_start()) * HeapWordSize + next_marked_bytes(); |
407 + next_marked_bytes(); | |
408 } | 411 } |
409 | 412 |
410 // A lower bound on the amount of garbage bytes in the region. | 413 // A lower bound on the amount of garbage bytes in the region. |
411 size_t garbage_bytes() { | 414 size_t garbage_bytes() { |
412 size_t used_at_mark_start_bytes = | 415 size_t used_at_mark_start_bytes = |