Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 20404:227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
Summary: Splitting out a g1 allocator class to simply specialized allocators which can associate each allocation with a given context.
Reviewed-by: mgerdin, brutisso
author | sjohanss |
---|---|
date | Fri, 05 Sep 2014 09:49:19 +0200 |
parents | 0982ec23da03 |
children | d3fd73295885 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Thu Sep 04 16:53:27 2014 -0700 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Fri Sep 05 09:49:19 2014 +0200 @@ -45,7 +45,8 @@ void VM_G1CollectForAllocation::doit() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); GCCauseSetter x(g1h, _gc_cause); - _result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded); + + _result = g1h->satisfy_failed_allocation(_word_size, allocation_context(), &_pause_succeeded); assert(_result == NULL || _pause_succeeded, "if we get back a result, the pause should have succeeded"); } @@ -99,7 +100,7 @@ if (_word_size > 0) { // An allocation has been requested. So, try to do that first. - _result = g1h->attempt_allocation_at_safepoint(_word_size, + _result = g1h->attempt_allocation_at_safepoint(_word_size, allocation_context(), false /* expect_null_cur_alloc_region */); if (_result != NULL) { // If we can successfully allocate before we actually do the @@ -152,7 +153,7 @@ g1h->do_collection_pause_at_safepoint(_target_pause_time_ms); if (_pause_succeeded && _word_size > 0) { // An allocation had been requested. - _result = g1h->attempt_allocation_at_safepoint(_word_size, + _result = g1h->attempt_allocation_at_safepoint(_word_size, allocation_context(), true /* expect_null_cur_alloc_region */); } else { assert(_result == NULL, "invariant");