Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionSet.cpp @ 20481:c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
Reviewed-by: brutisso, tschatzl
author | brutisso |
---|---|
date | Tue, 16 Sep 2014 14:27:40 +0200 |
parents | a8ea2f110d87 |
children | 7848fc12602b 33e421924c67 |
comparison
equal
deleted
inserted
replaced
20478:00448aa81791 | 20481:c02ec279b062 |
---|---|
40 #ifndef PRODUCT | 40 #ifndef PRODUCT |
41 void HeapRegionSetBase::verify_region(HeapRegion* hr) { | 41 void HeapRegionSetBase::verify_region(HeapRegion* hr) { |
42 assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrm_index())); | 42 assert(hr->containing_set() == this, err_msg("Inconsistent containing set for %u", hr->hrm_index())); |
43 assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrm_index())); // currently we don't use these sets for young regions | 43 assert(!hr->is_young(), err_msg("Adding young region %u", hr->hrm_index())); // currently we don't use these sets for young regions |
44 assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrm_index(), name())); | 44 assert(hr->isHumongous() == regions_humongous(), err_msg("Wrong humongous state for region %u and set %s", hr->hrm_index(), name())); |
45 assert(hr->is_empty() == regions_empty(), err_msg("Wrong empty state for region %u and set %s", hr->hrm_index(), name())); | 45 assert(hr->is_free() == regions_free(), err_msg("Wrong free state for region %u and set %s", hr->hrm_index(), name())); |
46 assert(!hr->is_free() || hr->is_empty(), err_msg("Free region %u is not empty for set %s", hr->hrm_index(), name())); | |
47 assert(!hr->is_empty() || hr->is_free(), err_msg("Empty region %u is not free for set %s", hr->hrm_index(), name())); | |
46 assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrm_index())); | 48 assert(hr->rem_set()->verify_ready_for_par_iteration(), err_msg("Wrong iteration state %u", hr->hrm_index())); |
47 } | 49 } |
48 #endif | 50 #endif |
49 | 51 |
50 void HeapRegionSetBase::verify() { | 52 void HeapRegionSetBase::verify() { |
83 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) { | 85 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) { |
84 out->cr(); | 86 out->cr(); |
85 out->print_cr("Set: %s ("PTR_FORMAT")", name(), this); | 87 out->print_cr("Set: %s ("PTR_FORMAT")", name(), this); |
86 out->print_cr(" Region Assumptions"); | 88 out->print_cr(" Region Assumptions"); |
87 out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous())); | 89 out->print_cr(" humongous : %s", BOOL_TO_STR(regions_humongous())); |
88 out->print_cr(" empty : %s", BOOL_TO_STR(regions_empty())); | 90 out->print_cr(" free : %s", BOOL_TO_STR(regions_free())); |
89 out->print_cr(" Attributes"); | 91 out->print_cr(" Attributes"); |
90 out->print_cr(" length : %14u", length()); | 92 out->print_cr(" length : %14u", length()); |
91 out->print_cr(" total capacity : "SIZE_FORMAT_W(14)" bytes", | 93 out->print_cr(" total capacity : "SIZE_FORMAT_W(14)" bytes", |
92 total_capacity_bytes()); | 94 total_capacity_bytes()); |
93 } | 95 } |
94 | 96 |
95 HeapRegionSetBase::HeapRegionSetBase(const char* name, bool humongous, bool empty, HRSMtSafeChecker* mt_safety_checker) | 97 HeapRegionSetBase::HeapRegionSetBase(const char* name, bool humongous, bool free, HRSMtSafeChecker* mt_safety_checker) |
96 : _name(name), _verify_in_progress(false), | 98 : _name(name), _verify_in_progress(false), |
97 _is_humongous(humongous), _is_empty(empty), _mt_safety_checker(mt_safety_checker), | 99 _is_humongous(humongous), _is_free(free), _mt_safety_checker(mt_safety_checker), |
98 _count() | 100 _count() |
99 { } | 101 { } |
100 | 102 |
101 void FreeRegionList::set_unrealistically_long_length(uint len) { | 103 void FreeRegionList::set_unrealistically_long_length(uint len) { |
102 guarantee(_unrealistically_long_length == 0, "should only be set once"); | 104 guarantee(_unrealistically_long_length == 0, "should only be set once"); |