< prev index next >

src/hotspot/share/gc/g1/heapRegion.hpp

Print this page

        

*** 58,67 **** --- 58,68 ---- class G1CollectedHeap; class G1CMBitMap; class G1IsAliveAndApplyClosure; class HeapRegionRemSet; + class HeapRegionRemSetIterator; class HeapRegion; class HeapRegionSetBase; class nmethod; #define HR_FORMAT "%u:(%s)[" PTR_FORMAT "," PTR_FORMAT "," PTR_FORMAT "]"
*** 253,265 **** static const uint InvalidCSetIndex = UINT_MAX; // The index in the optional regions array, if this region // is considered optional during a mixed collections. uint _index_in_opt_cset; ! ! // Data for young region survivor prediction. ! uint _young_index_in_cset; SurvRateGroup* _surv_rate_group; int _age_index; // The start of the unmarked area. The unmarked area extends from this // word until the top and/or end of the region, and is the part --- 254,264 ---- static const uint InvalidCSetIndex = UINT_MAX; // The index in the optional regions array, if this region // is considered optional during a mixed collections. uint _index_in_opt_cset; ! int _young_index_in_cset; SurvRateGroup* _surv_rate_group; int _age_index; // The start of the unmarked area. The unmarked area extends from this // word until the top and/or end of the region, and is the part
*** 289,309 **** // The predicted elapsed time that was added to total value // for the collection set. double _predicted_elapsed_time_ms; ! // Iterate over the references covered by the given MemRegion in a humongous ! // object and apply the given closure to them. // Humongous objects are allocated directly in the old-gen. So we need special // handling for concurrent processing encountering an in-progress allocation. - // Returns the address after the last actually scanned or NULL if the area could - // not be scanned (That should only happen when invoked concurrently with the - // mutator). template <class Closure, bool is_gc_active> ! inline HeapWord* do_oops_on_memregion_in_humongous(MemRegion mr, ! Closure* cl, ! G1CollectedHeap* g1h); // Returns the block size of the given (dead, potentially having its class unloaded) object // starting at p extending to at most the prev TAMS using the given mark bitmap. inline size_t block_size_using_bitmap(const HeapWord* p, const G1CMBitMap* const prev_bitmap) const; public: --- 288,305 ---- // The predicted elapsed time that was added to total value // for the collection set. double _predicted_elapsed_time_ms; ! // Iterate over the references in a humongous objects and apply the given closure ! // to them. // Humongous objects are allocated directly in the old-gen. So we need special // handling for concurrent processing encountering an in-progress allocation. template <class Closure, bool is_gc_active> ! inline bool do_oops_on_card_in_humongous(MemRegion mr, ! Closure* cl, ! G1CollectedHeap* g1h); // Returns the block size of the given (dead, potentially having its class unloaded) object // starting at p extending to at most the prev TAMS using the given mark bitmap. inline size_t block_size_using_bitmap(const HeapWord* p, const G1CMBitMap* const prev_bitmap) const; public:
*** 317,327 **** // there's clearing to be done ourselves. We also always mangle the space. virtual void initialize(MemRegion mr, bool clear_space = false, bool mangle_space = SpaceDecorator::Mangle); static int LogOfHRGrainBytes; static int LogOfHRGrainWords; - static int LogCardsPerRegion; static size_t GrainBytes; static size_t GrainWords; static size_t CardsPerRegion; --- 313,322 ----
*** 563,590 **** } bool has_index_in_opt_cset() const { return _index_in_opt_cset != InvalidCSetIndex; } void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; } void clear_index_in_opt_cset() { _index_in_opt_cset = InvalidCSetIndex; } ! uint young_index_in_cset() const { return _young_index_in_cset; } ! void clear_young_index_in_cset() { _young_index_in_cset = 0; } ! void set_young_index_in_cset(uint index) { ! assert(index != UINT_MAX, "just checking"); ! assert(index != 0, "just checking"); ! assert(is_young(), "pre-condition"); _young_index_in_cset = index; } int age_in_surv_rate_group() { ! assert(_surv_rate_group != NULL, "pre-condition"); ! assert(_age_index > -1, "pre-condition"); return _surv_rate_group->age_in_group(_age_index); } void record_surv_words_in_group(size_t words_survived) { ! assert(_surv_rate_group != NULL, "pre-condition"); ! assert(_age_index > -1, "pre-condition"); int age_in_group = age_in_surv_rate_group(); _surv_rate_group->record_surviving_words(age_in_group, words_survived); } int age_in_surv_rate_group_cond() { --- 558,582 ---- } bool has_index_in_opt_cset() const { return _index_in_opt_cset != InvalidCSetIndex; } void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; } void clear_index_in_opt_cset() { _index_in_opt_cset = InvalidCSetIndex; } ! int young_index_in_cset() const { return _young_index_in_cset; } ! void set_young_index_in_cset(int index) { ! assert( (index == -1) || is_young(), "pre-condition" ); _young_index_in_cset = index; } int age_in_surv_rate_group() { ! assert( _surv_rate_group != NULL, "pre-condition" ); ! assert( _age_index > -1, "pre-condition" ); return _surv_rate_group->age_in_group(_age_index); } void record_surv_words_in_group(size_t words_survived) { ! assert( _surv_rate_group != NULL, "pre-condition" ); ! assert( _age_index > -1, "pre-condition" ); int age_in_group = age_in_surv_rate_group(); _surv_rate_group->record_surviving_words(age_in_group, words_survived); } int age_in_surv_rate_group_cond() {
*** 597,623 **** SurvRateGroup* surv_rate_group() { return _surv_rate_group; } void install_surv_rate_group(SurvRateGroup* surv_rate_group) { ! assert(surv_rate_group != NULL, "pre-condition"); ! assert(_surv_rate_group == NULL, "pre-condition"); ! assert(is_young(), "pre-condition"); _surv_rate_group = surv_rate_group; _age_index = surv_rate_group->next_age_index(); } void uninstall_surv_rate_group() { if (_surv_rate_group != NULL) { ! assert(_age_index > -1, "pre-condition"); ! assert(is_young(), "pre-condition"); _surv_rate_group = NULL; _age_index = -1; } else { ! assert(_age_index == -1, "pre-condition"); } } void set_free(); --- 589,615 ---- SurvRateGroup* surv_rate_group() { return _surv_rate_group; } void install_surv_rate_group(SurvRateGroup* surv_rate_group) { ! assert( surv_rate_group != NULL, "pre-condition" ); ! assert( _surv_rate_group == NULL, "pre-condition" ); ! assert( is_young(), "pre-condition" ); _surv_rate_group = surv_rate_group; _age_index = surv_rate_group->next_age_index(); } void uninstall_surv_rate_group() { if (_surv_rate_group != NULL) { ! assert( _age_index > -1, "pre-condition" ); ! assert( is_young(), "pre-condition" ); _surv_rate_group = NULL; _age_index = -1; } else { ! assert( _age_index == -1, "pre-condition" ); } } void set_free();
*** 651,670 **** if (b) { _next_marked_bytes = 0; } } ! // Iterate over the objects overlapping the given memory region, applying cl // to all references in the region. This is a helper for // G1RemSet::refine_card*, and is tightly coupled with them. ! // mr must not be empty. Must be trimmed to the allocated/parseable space in this region. // This region must be old or humongous. ! // Returns the next unscanned address if the designated objects were successfully ! // processed, NULL if an unparseable part of the heap was encountered (That should ! // only happen when invoked concurrently with the mutator). template <bool is_gc_active, class Closure> ! inline HeapWord* oops_on_memregion_seq_iterate_careful(MemRegion mr, Closure* cl); size_t recorded_rs_length() const { return _recorded_rs_length; } double predicted_elapsed_time_ms() const { return _predicted_elapsed_time_ms; } void set_recorded_rs_length(size_t rs_length) { --- 643,664 ---- if (b) { _next_marked_bytes = 0; } } ! // Iterate over the objects overlapping part of a card, applying cl // to all references in the region. This is a helper for // G1RemSet::refine_card*, and is tightly coupled with them. ! // mr is the memory region covered by the card, trimmed to the ! // allocated space for this region. Must not be empty. // This region must be old or humongous. ! // Returns true if the designated objects were successfully ! // processed, false if an unparsable part of the heap was ! // encountered; that only happens when invoked concurrently with the ! // mutator. template <bool is_gc_active, class Closure> ! inline bool oops_on_card_seq_iterate_careful(MemRegion mr, Closure* cl); size_t recorded_rs_length() const { return _recorded_rs_length; } double predicted_elapsed_time_ms() const { return _predicted_elapsed_time_ms; } void set_recorded_rs_length(size_t rs_length) {
< prev index next >