< prev index next >

src/share/vm/gc/g1/g1InCSetState.hpp

Print this page
rev 9605 : imported patch in-cset-ext

*** 53,62 **** --- 53,63 ---- // frequency of the checks. // The most common check is whether the region is in the collection set or not, // this encoding allows us to use an > 0 check. // The other values are simply encoded in increasing generation order, which // makes getting the next generation fast by a simple increment. + Ext = -2, // Extension point Humongous = -1, // The region is humongous NotInCSet = 0, // The region is not in the collection set. Young = 1, // The region is in the collection set and a young region. Old = 2, // The region is in the collection set and an old region. Num
*** 74,87 **** bool is_in_cset() const { return _value > NotInCSet; } bool is_humongous() const { return _value == Humongous; } bool is_young() const { return _value == Young; } bool is_old() const { return _value == Old; } #ifdef ASSERT ! bool is_default() const { return !is_in_cset_or_humongous(); } ! bool is_valid() const { return (_value >= Humongous) && (_value < Num); } bool is_valid_gen() const { return (_value >= Young && _value <= Old); } #endif }; // Instances of this class are used for quick tests on whether a reference points --- 75,89 ---- bool is_in_cset() const { return _value > NotInCSet; } bool is_humongous() const { return _value == Humongous; } bool is_young() const { return _value == Young; } bool is_old() const { return _value == Old; } + bool is_ext() const { return _value == Ext; } #ifdef ASSERT ! bool is_default() const { return _value == NotInCSet; } ! bool is_valid() const { return (_value >= Ext) && (_value < Num); } bool is_valid_gen() const { return (_value >= Young && _value <= Old); } #endif }; // Instances of this class are used for quick tests on whether a reference points
*** 103,112 **** --- 105,120 ---- assert(get_by_index(index).is_default(), "State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value()); set_by_index(index, InCSetState::Humongous); } + void set_ext(uintptr_t index) { + assert(get_by_index(index).is_default(), + "State at index " INTPTR_FORMAT " should be default but is " CSETSTATE_FORMAT, index, get_by_index(index).value()); + set_by_index(index, InCSetState::Ext); + } + void clear_humongous(uintptr_t index) { set_by_index(index, InCSetState::NotInCSet); } void set_in_young(uintptr_t index) {
< prev index next >