src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp

Print this page
rev 6587 : 8047820: G1 Block offset table does not need to support generic Space classes
Reviewed-by:

*** 50,61 **** // that compilers might normally perform in the case of non-G1 // collectors needs to be carefully investigated prior to any such // consolidation. // Forward declarations - class ContiguousSpace; class G1BlockOffsetSharedArray; class G1BlockOffsetTable VALUE_OBJ_CLASS_SPEC { friend class VMStructs; protected: // These members describe the region covered by the table. --- 50,61 ---- // that compilers might normally perform in the case of non-G1 // collectors needs to be carefully investigated prior to any such // consolidation. // Forward declarations class G1BlockOffsetSharedArray; + class G1OffsetTableContigSpace; class G1BlockOffsetTable VALUE_OBJ_CLASS_SPEC { friend class VMStructs; protected: // These members describe the region covered by the table.
*** 279,293 **** // This is the array, which can be shared by several BlockOffsetArray's // servicing different G1BlockOffsetSharedArray* _array; // The space that owns this subregion. ! Space* _sp; ! ! // If "_sp" is a contiguous space, the field below is the view of "_sp" ! // as a contiguous space, else NULL. ! ContiguousSpace* _csp; // If true, array entries are initialized to 0; otherwise, they are // initialized to point backwards to the beginning of the covered region. bool _init_to_zero; --- 279,289 ---- // This is the array, which can be shared by several BlockOffsetArray's // servicing different G1BlockOffsetSharedArray* _array; // The space that owns this subregion. ! G1OffsetTableContigSpace* _gsp; // If true, array entries are initialized to 0; otherwise, they are // initialized to point backwards to the beginning of the covered region. bool _init_to_zero;
*** 308,318 **** // A helper function for BOT adjustment/verification work void do_block_internal(HeapWord* blk_start, HeapWord* blk_end, Action action); protected: ! ContiguousSpace* csp() const { return _csp; } // Returns the address of a block whose start is at most "addr". // If "has_max_index" is true, "assumes "max_index" is the last valid one // in the array. inline HeapWord* block_at_or_preceding(const void* addr, --- 304,316 ---- // A helper function for BOT adjustment/verification work void do_block_internal(HeapWord* blk_start, HeapWord* blk_end, Action action); protected: ! G1OffsetTableContigSpace* gsp() const { return _gsp; } ! ! inline size_t block_size(const HeapWord* p) const; // Returns the address of a block whose start is at most "addr". // If "has_max_index" is true, "assumes "max_index" is the last valid one // in the array. inline HeapWord* block_at_or_preceding(const void* addr,
*** 361,371 **** // Note: this ought to be part of the constructor, but that would require // "this" to be passed as a parameter to a member constructor for // the containing concrete subtype of Space. // This would be legal C++, but MS VC++ doesn't allow it. ! void set_space(Space* sp); // Resets the covered region to the given "mr". void set_region(MemRegion mr); // Resets the covered region to one with the same _bottom as before but --- 359,369 ---- // Note: this ought to be part of the constructor, but that would require // "this" to be passed as a parameter to a member constructor for // the containing concrete subtype of Space. // This would be legal C++, but MS VC++ doesn't allow it. ! void set_space(G1OffsetTableContigSpace* sp); // Resets the covered region to the given "mr". void set_region(MemRegion mr); // Resets the covered region to one with the same _bottom as before but