< prev index next >

src/share/vm/gc/g1/g1CollectorPolicy.hpp

Print this page




 619   virtual void note_gc_start(uint num_active_workers);
 620 
 621   // Create jstat counters for the policy.
 622   virtual void initialize_gc_policy_counters();
 623 
 624   virtual HeapWord* mem_allocate_work(size_t size,
 625                                       bool is_tlab,
 626                                       bool* gc_overhead_limit_was_exceeded);
 627 
 628   // This method controls how a collector handles one or more
 629   // of its generations being fully allocated.
 630   virtual HeapWord* satisfy_failed_allocation(size_t size,
 631                                               bool is_tlab);
 632 
 633   bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
 634 
 635   bool about_to_start_mixed_phase() const;
 636 
 637   // Record the start and end of an evacuation pause.
 638   void record_collection_pause_start(double start_time_sec);
 639   void record_collection_pause_end(double pause_time_ms, size_t cards_scanned);
 640 
 641   // Record the start and end of a full collection.
 642   void record_full_collection_start();
 643   void record_full_collection_end();
 644 
 645   // Must currently be called while the world is stopped.
 646   void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
 647 
 648   // Record start and end of remark.
 649   void record_concurrent_mark_remark_start();
 650   void record_concurrent_mark_remark_end();
 651 
 652   // Record start, end, and completion of cleanup.
 653   void record_concurrent_mark_cleanup_start();
 654   void record_concurrent_mark_cleanup_end();
 655   void record_concurrent_mark_cleanup_completed();
 656 
 657   // Records the information about the heap size for reporting in
 658   // print_detailed_heap_transition
 659   void record_heap_size_info_at_start(bool full);
 660 
 661   // Print heap sizing transition (with less and more detail).
 662 
 663   void print_detailed_heap_transition() const;
 664 
 665   virtual void print_phases();
 666 
 667   void record_stop_world_start();
 668   void record_concurrent_pause();
 669 
 670   // Record how much space we copied during a GC. This is typically
 671   // called when a GC alloc region is being retired.
 672   void record_bytes_copied_during_gc(size_t bytes) {
 673     _bytes_copied_during_gc += bytes;
 674   }
 675 
 676   // The amount of space we copied during a GC.
 677   size_t bytes_copied_during_gc() const {
 678     return _bytes_copied_during_gc;
 679   }
 680 
 681   size_t collection_set_bytes_used_before() const {
 682     return _collection_set_bytes_used_before;
 683   }
 684 


 807 
 808   virtual bool should_process_references() const {
 809     return true;
 810   }
 811 
 812 private:
 813   //
 814   // Survivor regions policy.
 815   //
 816 
 817   // Current tenuring threshold, set to 0 if the collector reaches the
 818   // maximum amount of survivors regions.
 819   uint _tenuring_threshold;
 820 
 821   // The limit on the number of regions allocated for survivors.
 822   uint _max_survivor_regions;
 823 
 824   // For reporting purposes.
 825   // The value of _heap_bytes_before_gc is also used to calculate
 826   // the cost of copying.
 827 
 828   size_t _eden_used_bytes_before_gc;         // Eden occupancy before GC
 829   size_t _survivor_used_bytes_before_gc;     // Survivor occupancy before GC
 830   size_t _old_used_bytes_before_gc;          // Old occupancy before GC
 831   size_t _humongous_used_bytes_before_gc;    // Humongous occupancy before GC
 832   size_t _heap_used_bytes_before_gc;         // Heap occupancy before GC
 833   size_t _metaspace_used_bytes_before_gc;    // Metaspace occupancy before GC
 834 
 835   size_t _eden_capacity_bytes_before_gc;     // Eden capacity before GC
 836   size_t _heap_capacity_bytes_before_gc;     // Heap capacity before GC
 837 
 838   // The amount of survivor regions after a collection.
 839   uint _recorded_survivor_regions;
 840   // List of survivor regions.
 841   HeapRegion* _recorded_survivor_head;
 842   HeapRegion* _recorded_survivor_tail;
 843 
 844   AgeTable _survivors_age_table;
 845 
 846 public:
 847   uint tenuring_threshold() const { return _tenuring_threshold; }
 848 
 849   uint max_survivor_regions() {
 850     return _max_survivor_regions;
 851   }
 852 
 853   void note_start_adding_survivor_regions() {
 854     _survivor_surv_rate_group->start_adding_regions();
 855   }
 856 




 619   virtual void note_gc_start(uint num_active_workers);
 620 
 621   // Create jstat counters for the policy.
 622   virtual void initialize_gc_policy_counters();
 623 
 624   virtual HeapWord* mem_allocate_work(size_t size,
 625                                       bool is_tlab,
 626                                       bool* gc_overhead_limit_was_exceeded);
 627 
 628   // This method controls how a collector handles one or more
 629   // of its generations being fully allocated.
 630   virtual HeapWord* satisfy_failed_allocation(size_t size,
 631                                               bool is_tlab);
 632 
 633   bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
 634 
 635   bool about_to_start_mixed_phase() const;
 636 
 637   // Record the start and end of an evacuation pause.
 638   void record_collection_pause_start(double start_time_sec);
 639   void record_collection_pause_end(double pause_time_ms, size_t cards_scanned, size_t heap_used_bytes_before_gc);
 640 
 641   // Record the start and end of a full collection.
 642   void record_full_collection_start();
 643   void record_full_collection_end();
 644 
 645   // Must currently be called while the world is stopped.
 646   void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
 647 
 648   // Record start and end of remark.
 649   void record_concurrent_mark_remark_start();
 650   void record_concurrent_mark_remark_end();
 651 
 652   // Record start, end, and completion of cleanup.
 653   void record_concurrent_mark_cleanup_start();
 654   void record_concurrent_mark_cleanup_end();
 655   void record_concurrent_mark_cleanup_completed();
 656 








 657   virtual void print_phases();
 658 
 659   void record_stop_world_start();
 660   void record_concurrent_pause();
 661 
 662   // Record how much space we copied during a GC. This is typically
 663   // called when a GC alloc region is being retired.
 664   void record_bytes_copied_during_gc(size_t bytes) {
 665     _bytes_copied_during_gc += bytes;
 666   }
 667 
 668   // The amount of space we copied during a GC.
 669   size_t bytes_copied_during_gc() const {
 670     return _bytes_copied_during_gc;
 671   }
 672 
 673   size_t collection_set_bytes_used_before() const {
 674     return _collection_set_bytes_used_before;
 675   }
 676 


 799 
 800   virtual bool should_process_references() const {
 801     return true;
 802   }
 803 
 804 private:
 805   //
 806   // Survivor regions policy.
 807   //
 808 
 809   // Current tenuring threshold, set to 0 if the collector reaches the
 810   // maximum amount of survivors regions.
 811   uint _tenuring_threshold;
 812 
 813   // The limit on the number of regions allocated for survivors.
 814   uint _max_survivor_regions;
 815 
 816   // For reporting purposes.
 817   // The value of _heap_bytes_before_gc is also used to calculate
 818   // the cost of copying.










 819 
 820   // The amount of survivor regions after a collection.
 821   uint _recorded_survivor_regions;
 822   // List of survivor regions.
 823   HeapRegion* _recorded_survivor_head;
 824   HeapRegion* _recorded_survivor_tail;
 825 
 826   AgeTable _survivors_age_table;
 827 
 828 public:
 829   uint tenuring_threshold() const { return _tenuring_threshold; }
 830 
 831   uint max_survivor_regions() {
 832     return _max_survivor_regions;
 833   }
 834 
 835   void note_start_adding_survivor_regions() {
 836     _survivor_surv_rate_group->start_adding_regions();
 837   }
 838 


< prev index next >