Print this page
rev 2691 : [mq]: g1-reference-processing

Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/g1/heapRegion.hpp
          +++ new/src/share/vm/gc_implementation/g1/heapRegion.hpp
↓ open down ↓ 110 lines elided ↑ open up ↑
 111  111      Filtering_DCTOC::walk_mem_region(mr, bottom, top);
 112  112    }
 113  113  
 114  114  public:
 115  115    HeapRegionDCTOC(G1CollectedHeap* g1,
 116  116                    HeapRegion* hr, OopClosure* cl,
 117  117                    CardTableModRefBS::PrecisionStyle precision,
 118  118                    FilterKind fk);
 119  119  };
 120  120  
 121      -
 122  121  // The complicating factor is that BlockOffsetTable diverged
 123  122  // significantly, and we need functionality that is only in the G1 version.
 124  123  // So I copied that code, which led to an alternate G1 version of
 125  124  // OffsetTableContigSpace.  If the two versions of BlockOffsetTable could
 126  125  // be reconciled, then G1OffsetTableContigSpace could go away.
 127  126  
 128  127  // The idea behind time stamps is the following. Doing a save_marks on
 129  128  // all regions at every GC pause is time consuming (if I remember
 130  129  // well, 10ms or so). So, we would like to do that only for regions
 131  130  // that are GC alloc regions. To achieve this, we use time
↓ open down ↓ 84 lines elided ↑ open up ↑
 216  215  class HeapRegion: public G1OffsetTableContigSpace {
 217  216    friend class VMStructs;
 218  217   private:
 219  218  
 220  219    enum HumongousType {
 221  220      NotHumongous = 0,
 222  221      StartsHumongous,
 223  222      ContinuesHumongous
 224  223    };
 225  224  
 226      -  // The next filter kind that should be used for a "new_dcto_cl" call with
 227      -  // the "traditional" signature.
 228      -  HeapRegionDCTOC::FilterKind _next_fk;
 229      -
 230  225    // Requires that the region "mr" be dense with objects, and begin and end
 231  226    // with an object.
 232  227    void oops_in_mr_iterate(MemRegion mr, OopClosure* cl);
 233  228  
 234  229    // The remembered set for this region.
 235  230    // (Might want to make this "inline" later, to avoid some alloc failure
 236  231    // issues.)
 237  232    HeapRegionRemSet* _rem_set;
 238  233  
 239  234    G1BlockOffsetArrayContigSpace* offsets() { return &_offsets; }
↓ open down ↓ 326 lines elided ↑ open up ↑
 566  561    void initialize(MemRegion mr, bool clear_space, bool mangle_space);
 567  562  
 568  563    // Get the start of the unmarked area in this region.
 569  564    HeapWord* prev_top_at_mark_start() const { return _prev_top_at_mark_start; }
 570  565    HeapWord* next_top_at_mark_start() const { return _next_top_at_mark_start; }
 571  566  
 572  567    // Apply "cl->do_oop" to (the addresses of) all reference fields in objects
 573  568    // allocated in the current region before the last call to "save_mark".
 574  569    void oop_before_save_marks_iterate(OopClosure* cl);
 575  570  
 576      -  // This call determines the "filter kind" argument that will be used for
 577      -  // the next call to "new_dcto_cl" on this region with the "traditional"
 578      -  // signature (i.e., the call below.)  The default, in the absence of a
 579      -  // preceding call to this method, is "NoFilterKind", and a call to this
 580      -  // method is necessary for each such call, or else it reverts to the
 581      -  // default.
 582      -  // (This is really ugly, but all other methods I could think of changed a
 583      -  // lot of main-line code for G1.)
 584      -  void set_next_filter_kind(HeapRegionDCTOC::FilterKind nfk) {
 585      -    _next_fk = nfk;
 586      -  }
 587      -
 588  571    DirtyCardToOopClosure*
 589  572    new_dcto_closure(OopClosure* cl,
 590  573                     CardTableModRefBS::PrecisionStyle precision,
 591  574                     HeapRegionDCTOC::FilterKind fk);
 592  575  
 593      -#if WHASSUP
 594      -  DirtyCardToOopClosure*
 595      -  new_dcto_closure(OopClosure* cl,
 596      -                   CardTableModRefBS::PrecisionStyle precision,
 597      -                   HeapWord* boundary) {
 598      -    assert(boundary == NULL, "This arg doesn't make sense here.");
 599      -    DirtyCardToOopClosure* res = new_dcto_closure(cl, precision, _next_fk);
 600      -    _next_fk = HeapRegionDCTOC::NoFilterKind;
 601      -    return res;
 602      -  }
 603      -#endif
 604      -
 605      -  //
 606  576    // Note the start or end of marking. This tells the heap region
 607  577    // that the collector is about to start or has finished (concurrently)
 608  578    // marking the heap.
 609      -  //
 610  579  
 611  580    // Note the start of a marking phase. Record the
 612  581    // start of the unmarked area of the region here.
 613  582    void note_start_of_marking(bool during_initial_mark) {
 614  583      init_top_at_conc_mark_count();
 615  584      _next_marked_bytes = 0;
 616  585      if (during_initial_mark && is_young() && !is_survivor())
 617  586        _next_top_at_mark_start = bottom();
 618  587      else
 619  588        _next_top_at_mark_start = top();
↓ open down ↓ 255 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX