mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-06 16:38:36 +00:00
8365024: G1: Make G1CollectionSet::_inc_build_state assert-only
Reviewed-by: ayang, kbarrett
This commit is contained in:
parent
fb651fd6d2
commit
cf70cb70bc
@ -67,7 +67,7 @@ G1CollectionSet::G1CollectionSet(G1CollectedHeap* g1h, G1Policy* policy) :
|
||||
_survivor_region_length(0),
|
||||
_initial_old_region_length(0),
|
||||
_optional_groups(),
|
||||
_inc_build_state(CSetBuildType::Inactive),
|
||||
DEBUG_ONLY(_inc_build_state(CSetBuildType::Inactive) COMMA)
|
||||
_regions_inc_part_start(0),
|
||||
_groups_inc_part_start(0) {
|
||||
}
|
||||
@ -142,11 +142,11 @@ void G1CollectionSet::continue_incremental_building() {
|
||||
_regions_inc_part_start = _regions_cur_length;
|
||||
_groups_inc_part_start = groups_cur_length();
|
||||
|
||||
_inc_build_state = CSetBuildType::Active;
|
||||
DEBUG_ONLY(_inc_build_state = CSetBuildType::Active;)
|
||||
}
|
||||
|
||||
void G1CollectionSet::stop_incremental_building() {
|
||||
_inc_build_state = CSetBuildType::Inactive;
|
||||
DEBUG_ONLY(_inc_build_state = CSetBuildType::Inactive;)
|
||||
}
|
||||
|
||||
void G1CollectionSet::clear() {
|
||||
|
||||
@ -165,12 +165,14 @@ class G1CollectionSet {
|
||||
// groups. Regions are reachable via this list as well.
|
||||
G1CSetCandidateGroupList _optional_groups;
|
||||
|
||||
#ifdef ASSERT
|
||||
enum class CSetBuildType {
|
||||
Active, // We are actively building the collection set
|
||||
Inactive // We are not actively building the collection set
|
||||
};
|
||||
|
||||
CSetBuildType _inc_build_state;
|
||||
#endif
|
||||
// Index into the _regions indicating the start of the current collection set increment.
|
||||
size_t _regions_inc_part_start;
|
||||
// Index into the _groups indicating the start of the current collection set increment.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user