Print this page


Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
          +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
↓ open down ↓ 508 lines elided ↑ open up ↑
 509  509  private:
 510  510    CMSCollector& _collector;
 511  511  };
 512  512  
 513  513  
 514  514  class CMSCollector: public CHeapObj<mtGC> {
 515  515    friend class VMStructs;
 516  516    friend class ConcurrentMarkSweepThread;
 517  517    friend class ConcurrentMarkSweepGeneration;
 518  518    friend class CompactibleFreeListSpace;
      519 +  friend class CMSParMarkTask;
      520 +  friend class CMSParInitialMarkTask;
 519  521    friend class CMSParRemarkTask;
 520  522    friend class CMSConcMarkingTask;
 521  523    friend class CMSRefProcTaskProxy;
 522  524    friend class CMSRefProcTaskExecutor;
 523  525    friend class ScanMarkedObjectsAgainCarefullyClosure;  // for sampling eden
 524  526    friend class SurvivorSpacePrecleanClosure;            // --- ditto -------
 525  527    friend class PushOrMarkClosure;             // to access _restart_addr
 526  528    friend class Par_PushOrMarkClosure;             // to access _restart_addr
 527  529    friend class MarkFromRootsClosure;          //  -- ditto --
 528  530                                                // ... and for clearing cards
↓ open down ↓ 216 lines elided ↑ open up ↑
 745  747    YieldingFlexibleWorkGang* conc_workers() { return _conc_workers; }
 746  748  
 747  749    // Support for parallelizing Eden rescan in CMS remark phase
 748  750    void sample_eden(); // ... sample Eden space top
 749  751  
 750  752   private:
 751  753    // Support for parallelizing young gen rescan in CMS remark phase
 752  754    Generation* _young_gen;  // the younger gen
 753  755    HeapWord** _top_addr;    // ... Top of Eden
 754  756    HeapWord** _end_addr;    // ... End of Eden
      757 +  Mutex*     _eden_chunk_lock;
 755  758    HeapWord** _eden_chunk_array; // ... Eden partitioning array
 756  759    size_t     _eden_chunk_index; // ... top (exclusive) of array
 757  760    size_t     _eden_chunk_capacity;  // ... max entries in array
 758  761  
 759  762    // Support for parallelizing survivor space rescan
 760  763    HeapWord** _survivor_chunk_array;
 761  764    size_t     _survivor_chunk_index;
 762  765    size_t     _survivor_chunk_capacity;
 763  766    size_t*    _cursor;
 764  767    ChunkArray* _survivor_plab_array;
↓ open down ↓ 181 lines elided ↑ open up ↑
 946  949        // gc not in progress
 947  950        return _time_of_last_gc;
 948  951      } else {
 949  952        // collection in progress
 950  953        return now;
 951  954      }
 952  955    }
 953  956  
 954  957    // Support for parallel remark of survivor space
 955  958    void* get_data_recorder(int thr_num);
      959 +  void sample_eden_chunk();
 956  960  
 957  961    CMSBitMap* markBitMap()  { return &_markBitMap; }
 958  962    void directAllocated(HeapWord* start, size_t size);
 959  963  
 960  964    // main CMS steps and related support
 961  965    void checkpointRootsInitial(bool asynch);
 962  966    bool markFromRoots(bool asynch);  // a return value of false indicates failure
 963  967                                      // due to stack overflow
 964  968    void preclean();
 965  969    void checkpointRootsFinal(bool asynch, bool clear_all_soft_refs,
↓ open down ↓ 58 lines elided ↑ open up ↑
1024 1028  
1025 1029    // accessors
1026 1030    CMSMarkStack* verification_mark_stack() { return &_markStack; }
1027 1031    CMSBitMap*    verification_mark_bm()    { return &_verification_mark_bm; }
1028 1032  
1029 1033    // Get the bit map with a perm gen "deadness" information.
1030 1034    CMSBitMap* perm_gen_verify_bit_map()       { return &_perm_gen_verify_bit_map; }
1031 1035  
1032 1036    // Initialization errors
1033 1037    bool completed_initialization() { return _completed_initialization; }
     1038 +
     1039 +  void print_eden_and_survivor_chunk_arrays();
1034 1040  };
1035 1041  
1036 1042  class CMSExpansionCause : public AllStatic  {
1037 1043   public:
1038 1044    enum Cause {
1039 1045      _no_expansion,
1040 1046      _satisfy_free_ratio,
1041 1047      _satisfy_promotion,
1042 1048      _satisfy_allocation,
1043 1049      _allocate_par_lab,
↓ open down ↓ 266 lines elided ↑ open up ↑
1310 1316    virtual void update_counters();
1311 1317    virtual void update_counters(size_t used);
1312 1318    void initialize_performance_counters();
1313 1319    CollectorCounters* counters()  { return collector()->counters(); }
1314 1320  
1315 1321    // Support for parallel remark of survivor space
1316 1322    void* get_data_recorder(int thr_num) {
1317 1323      //Delegate to collector
1318 1324      return collector()->get_data_recorder(thr_num);
1319 1325    }
     1326 +  void sample_eden_chunk() {
     1327 +    //Delegate to collector
     1328 +    return collector()->sample_eden_chunk();
     1329 +  }
1320 1330  
1321 1331    // Printing
1322 1332    const char* name() const;
1323 1333    virtual const char* short_name() const { return "CMS"; }
1324 1334    void        print() const;
1325 1335    void printOccupancy(const char* s);
1326 1336    bool must_be_youngest() const { return false; }
1327 1337    bool must_be_oldest()   const { return true; }
1328 1338  
1329 1339    void compute_new_size();
↓ open down ↓ 601 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX