hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
changeset 12272 f87fd1292095
parent 12270 9625585c6047
child 12381 1438e0fbfa27
equal deleted inserted replaced
12271:8cf95843833b 12272:f87fd1292095
    62 public:
    62 public:
    63   virtual MainBodySummary*    main_body_summary()    { return NULL; }
    63   virtual MainBodySummary*    main_body_summary()    { return NULL; }
    64 };
    64 };
    65 
    65 
    66 class MainBodySummary: public CHeapObj {
    66 class MainBodySummary: public CHeapObj {
    67   define_num_seq(satb_drain) // optional
       
    68   define_num_seq(root_region_scan_wait)
    67   define_num_seq(root_region_scan_wait)
    69   define_num_seq(parallel) // parallel only
    68   define_num_seq(parallel) // parallel only
    70     define_num_seq(ext_root_scan)
    69     define_num_seq(ext_root_scan)
    71     define_num_seq(satb_filtering)
    70     define_num_seq(satb_filtering)
    72     define_num_seq(update_rs)
    71     define_num_seq(update_rs)
    73     define_num_seq(scan_rs)
    72     define_num_seq(scan_rs)
    74     define_num_seq(obj_copy)
    73     define_num_seq(obj_copy)
    75     define_num_seq(termination) // parallel only
    74     define_num_seq(termination) // parallel only
    76     define_num_seq(parallel_other) // parallel only
    75     define_num_seq(parallel_other) // parallel only
    77   define_num_seq(mark_closure)
       
    78   define_num_seq(clear_ct)
    76   define_num_seq(clear_ct)
    79 };
    77 };
    80 
    78 
    81 class Summary: public PauseSummary,
    79 class Summary: public PauseSummary,
    82                public MainBodySummary {
    80                public MainBodySummary {
   180   size_t _cur_collection_pause_used_regions_at_start;
   178   size_t _cur_collection_pause_used_regions_at_start;
   181   double _cur_collection_par_time_ms;
   179   double _cur_collection_par_time_ms;
   182 
   180 
   183   double _cur_collection_code_root_fixup_time_ms;
   181   double _cur_collection_code_root_fixup_time_ms;
   184 
   182 
   185   double _cur_satb_drain_time_ms;
       
   186   double _cur_clear_ct_time_ms;
   183   double _cur_clear_ct_time_ms;
   187   double _cur_ref_proc_time_ms;
   184   double _cur_ref_proc_time_ms;
   188   double _cur_ref_enq_time_ms;
   185   double _cur_ref_enq_time_ms;
   189 
   186 
   190 #ifndef PRODUCT
   187 #ifndef PRODUCT
   489   double predict_non_young_other_time_ms(size_t non_young_num) {
   486   double predict_non_young_other_time_ms(size_t non_young_num) {
   490     return (double) non_young_num *
   487     return (double) non_young_num *
   491            get_new_prediction(_non_young_other_cost_per_region_ms_seq);
   488            get_new_prediction(_non_young_other_cost_per_region_ms_seq);
   492   }
   489   }
   493 
   490 
   494   double predict_young_collection_elapsed_time_ms(size_t adjustment);
       
   495   double predict_base_elapsed_time_ms(size_t pending_cards);
   491   double predict_base_elapsed_time_ms(size_t pending_cards);
   496   double predict_base_elapsed_time_ms(size_t pending_cards,
   492   double predict_base_elapsed_time_ms(size_t pending_cards,
   497                                       size_t scanned_cards);
   493                                       size_t scanned_cards);
   498   size_t predict_bytes_to_copy(HeapRegion* hr);
   494   size_t predict_bytes_to_copy(HeapRegion* hr);
   499   double predict_region_elapsed_time_ms(HeapRegion* hr, bool young);
   495   double predict_region_elapsed_time_ms(HeapRegion* hr, bool young);
   710   // This set of variables tracks the collector efficiency, in order to
   706   // This set of variables tracks the collector efficiency, in order to
   711   // determine whether we should initiate a new marking.
   707   // determine whether we should initiate a new marking.
   712   double _cur_mark_stop_world_time_ms;
   708   double _cur_mark_stop_world_time_ms;
   713   double _mark_remark_start_sec;
   709   double _mark_remark_start_sec;
   714   double _mark_cleanup_start_sec;
   710   double _mark_cleanup_start_sec;
   715   double _mark_closure_time_ms;
       
   716   double _root_region_scan_wait_time_ms;
   711   double _root_region_scan_wait_time_ms;
   717 
   712 
   718   // Update the young list target length either by setting it to the
   713   // Update the young list target length either by setting it to the
   719   // desired fixed value or by calculating it using G1's pause
   714   // desired fixed value or by calculating it using G1's pause
   720   // prediction model. If no rs_lengths parameter is passed, predict
   715   // prediction model. If no rs_lengths parameter is passed, predict
   810 
   805 
   811   // Must currently be called while the world is stopped.
   806   // Must currently be called while the world is stopped.
   812   void record_concurrent_mark_init_end(double
   807   void record_concurrent_mark_init_end(double
   813                                            mark_init_elapsed_time_ms);
   808                                            mark_init_elapsed_time_ms);
   814 
   809 
   815   void record_mark_closure_time(double mark_closure_time_ms) {
       
   816     _mark_closure_time_ms = mark_closure_time_ms;
       
   817   }
       
   818 
       
   819   void record_root_region_scan_wait_time(double time_ms) {
   810   void record_root_region_scan_wait_time(double time_ms) {
   820     _root_region_scan_wait_time_ms = time_ms;
   811     _root_region_scan_wait_time_ms = time_ms;
   821   }
   812   }
   822 
   813 
   823   void record_concurrent_mark_remark_start();
   814   void record_concurrent_mark_remark_start();
   845     _par_last_ext_root_scan_times_ms[worker_i] = ms;
   836     _par_last_ext_root_scan_times_ms[worker_i] = ms;
   846   }
   837   }
   847 
   838 
   848   void record_satb_filtering_time(int worker_i, double ms) {
   839   void record_satb_filtering_time(int worker_i, double ms) {
   849     _par_last_satb_filtering_times_ms[worker_i] = ms;
   840     _par_last_satb_filtering_times_ms[worker_i] = ms;
   850   }
       
   851 
       
   852   void record_satb_drain_time(double ms) {
       
   853     assert(_g1->mark_in_progress(), "shouldn't be here otherwise");
       
   854     _cur_satb_drain_time_ms = ms;
       
   855   }
   841   }
   856 
   842 
   857   void record_update_rs_time(int thread, double ms) {
   843   void record_update_rs_time(int thread, double ms) {
   858     _par_last_update_rs_times_ms[thread] = ms;
   844     _par_last_update_rs_times_ms[thread] = ms;
   859   }
   845   }