src/hotspot/share/gc/g1/g1ParScanThreadState.hpp
changeset 55752 8ae33203d600
parent 55510 3e31a8beaae4
child 57777 90ead0febf56
equal deleted inserted replaced
55751:014decdb5086 55752:8ae33203d600
    25 #ifndef SHARE_GC_G1_G1PARSCANTHREADSTATE_HPP
    25 #ifndef SHARE_GC_G1_G1PARSCANTHREADSTATE_HPP
    26 #define SHARE_GC_G1_G1PARSCANTHREADSTATE_HPP
    26 #define SHARE_GC_G1_G1PARSCANTHREADSTATE_HPP
    27 
    27 
    28 #include "gc/g1/g1CardTable.hpp"
    28 #include "gc/g1/g1CardTable.hpp"
    29 #include "gc/g1/g1CollectedHeap.hpp"
    29 #include "gc/g1/g1CollectedHeap.hpp"
    30 #include "gc/g1/g1DirtyCardQueue.hpp"
    30 #include "gc/g1/g1RedirtyCardsQueue.hpp"
    31 #include "gc/g1/g1OopClosures.hpp"
    31 #include "gc/g1/g1OopClosures.hpp"
    32 #include "gc/g1/g1Policy.hpp"
    32 #include "gc/g1/g1Policy.hpp"
    33 #include "gc/g1/g1RemSet.hpp"
    33 #include "gc/g1/g1RemSet.hpp"
    34 #include "gc/g1/heapRegionRemSet.hpp"
    34 #include "gc/g1/heapRegionRemSet.hpp"
    35 #include "gc/shared/ageTable.hpp"
    35 #include "gc/shared/ageTable.hpp"
    44 class outputStream;
    44 class outputStream;
    45 
    45 
    46 class G1ParScanThreadState : public CHeapObj<mtGC> {
    46 class G1ParScanThreadState : public CHeapObj<mtGC> {
    47   G1CollectedHeap* _g1h;
    47   G1CollectedHeap* _g1h;
    48   RefToScanQueue* _refs;
    48   RefToScanQueue* _refs;
    49   G1DirtyCardQueue _dcq;
    49   G1RedirtyCardsQueue _rdcq;
    50   G1CardTable* _ct;
    50   G1CardTable* _ct;
    51   G1EvacuationRootClosures* _closures;
    51   G1EvacuationRootClosures* _closures;
    52 
    52 
    53   G1PLABAllocator* _plab_allocator;
    53   G1PLABAllocator* _plab_allocator;
    54 
    54 
    79   // available for allocation.
    79   // available for allocation.
    80   bool _old_gen_is_full;
    80   bool _old_gen_is_full;
    81 
    81 
    82 #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t))
    82 #define PADDING_ELEM_NUM (DEFAULT_CACHE_LINE_SIZE / sizeof(size_t))
    83 
    83 
    84   G1DirtyCardQueue& dirty_card_queue()           { return _dcq; }
    84   G1RedirtyCardsQueue& redirty_cards_queue()     { return _rdcq; }
    85   G1CardTable* ct()                              { return _ct; }
    85   G1CardTable* ct()                              { return _ct; }
    86 
    86 
    87   G1HeapRegionAttr dest(G1HeapRegionAttr original) const {
    87   G1HeapRegionAttr dest(G1HeapRegionAttr original) const {
    88     assert(original.is_valid(),
    88     assert(original.is_valid(),
    89            "Original region attr invalid: %s", original.get_type_str());
    89            "Original region attr invalid: %s", original.get_type_str());
   131       return;
   131       return;
   132     }
   132     }
   133     size_t card_index = ct()->index_for(p);
   133     size_t card_index = ct()->index_for(p);
   134     // If the card hasn't been added to the buffer, do it.
   134     // If the card hasn't been added to the buffer, do it.
   135     if (_last_enqueued_card != card_index) {
   135     if (_last_enqueued_card != card_index) {
   136       dirty_card_queue().enqueue(ct()->byte_for_index(card_index));
   136       redirty_cards_queue().enqueue(ct()->byte_for_index(card_index));
   137       _last_enqueued_card = card_index;
   137       _last_enqueued_card = card_index;
   138     }
   138     }
   139   }
   139   }
   140 
   140 
   141   G1EvacuationRootClosures* closures() { return _closures; }
   141   G1EvacuationRootClosures* closures() { return _closures; }