Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegion.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 | a8ea2f110d87 |
children | d35872270666 |
comparison
equal
deleted
inserted
replaced
20403:8ec8971f511a | 20404:227a9e5e4b4a |
---|---|
217 assert(_end == _orig_end, | 217 assert(_end == _orig_end, |
218 "we should have already filtered out humongous regions"); | 218 "we should have already filtered out humongous regions"); |
219 | 219 |
220 _in_collection_set = false; | 220 _in_collection_set = false; |
221 | 221 |
222 set_allocation_context(AllocationContext::system()); | |
222 set_young_index_in_cset(-1); | 223 set_young_index_in_cset(-1); |
223 uninstall_surv_rate_group(); | 224 uninstall_surv_rate_group(); |
224 set_young_type(NotYoung); | 225 set_young_type(NotYoung); |
225 reset_pre_dummy_top(); | 226 reset_pre_dummy_top(); |
226 | 227 |
344 return low; | 345 return low; |
345 } | 346 } |
346 | 347 |
347 HeapRegion::HeapRegion(uint hrm_index, | 348 HeapRegion::HeapRegion(uint hrm_index, |
348 G1BlockOffsetSharedArray* sharedOffsetArray, | 349 G1BlockOffsetSharedArray* sharedOffsetArray, |
349 MemRegion mr) : | 350 MemRegion mr, AllocationContext_t context) : |
350 G1OffsetTableContigSpace(sharedOffsetArray, mr), | 351 G1OffsetTableContigSpace(sharedOffsetArray, mr), |
351 _hrm_index(hrm_index), | 352 _hrm_index(hrm_index), _allocation_context(context), |
352 _humongous_type(NotHumongous), _humongous_start_region(NULL), | 353 _humongous_type(NotHumongous), _humongous_start_region(NULL), |
353 _in_collection_set(false), | 354 _in_collection_set(false), |
354 _next_in_special_set(NULL), _orig_end(NULL), | 355 _next_in_special_set(NULL), _orig_end(NULL), |
355 _claimed(InitialClaimValue), _evacuation_failed(false), | 356 _claimed(InitialClaimValue), _evacuation_failed(false), |
356 _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0), | 357 _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0), |
713 } | 714 } |
714 } | 715 } |
715 | 716 |
716 void HeapRegion::print() const { print_on(gclog_or_tty); } | 717 void HeapRegion::print() const { print_on(gclog_or_tty); } |
717 void HeapRegion::print_on(outputStream* st) const { | 718 void HeapRegion::print_on(outputStream* st) const { |
719 st->print("AC%4u", allocation_context()); | |
720 | |
718 if (isHumongous()) { | 721 if (isHumongous()) { |
719 if (startsHumongous()) | 722 if (startsHumongous()) |
720 st->print(" HS"); | 723 st->print(" HS"); |
721 else | 724 else |
722 st->print(" HC"); | 725 st->print(" HC"); |