Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 6646:c38f13903fdf
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ just before the NPG (no perm gen) changeset
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 29 Oct 2012 21:10:04 +0100 |
parents | 957c266d8bc5 7383557659bd |
children | e522a00b91aa |
comparison
equal
deleted
inserted
replaced
6590:dc5eec61daba | 6646:c38f13903fdf |
---|---|
382 (CardTableModRefBS*)G1CollectedHeap::heap()->barrier_set(); | 382 (CardTableModRefBS*)G1CollectedHeap::heap()->barrier_set(); |
383 ct_bs->clear(MemRegion(bottom(), end())); | 383 ct_bs->clear(MemRegion(bottom(), end())); |
384 } | 384 } |
385 | 385 |
386 void HeapRegion::calc_gc_efficiency() { | 386 void HeapRegion::calc_gc_efficiency() { |
387 // GC efficiency is the ratio of how much space would be | |
388 // reclaimed over how long we predict it would take to reclaim it. | |
387 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | 389 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
388 G1CollectorPolicy* g1p = g1h->g1_policy(); | 390 G1CollectorPolicy* g1p = g1h->g1_policy(); |
389 _gc_efficiency = (double) reclaimable_bytes() / | 391 |
390 g1p->predict_region_elapsed_time_ms(this, false); | 392 // Retrieve a prediction of the elapsed time for this region for |
393 // a mixed gc because the region will only be evacuated during a | |
394 // mixed gc. | |
395 double region_elapsed_time_ms = | |
396 g1p->predict_region_elapsed_time_ms(this, false /* for_young_gc */); | |
397 _gc_efficiency = (double) reclaimable_bytes() / region_elapsed_time_ms; | |
391 } | 398 } |
392 | 399 |
393 void HeapRegion::set_startsHumongous(HeapWord* new_top, HeapWord* new_end) { | 400 void HeapRegion::set_startsHumongous(HeapWord* new_top, HeapWord* new_end) { |
394 assert(!isHumongous(), "sanity / pre-condition"); | 401 assert(!isHumongous(), "sanity / pre-condition"); |
395 assert(end() == _orig_end, | 402 assert(end() == _orig_end, |