src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp

Print this page
rev 3986 : 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
Summary: Refactor G1's hot card cache and card counts table into their own files. Simplify the card counts table, including removing the encoding of the card index in each entry. The card counts table now has a 1:1 correspondence with the cards spanned by heap. Space for the card counts table is reserved from virtual memory (rather than C heap) during JVM startup and is committed/expanded when the heap is expanded.
Reviewed-by:
   1 /*
   2  * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 114   WorkerDataArray<double> _last_gc_worker_start_times_ms;
 115   WorkerDataArray<double> _last_ext_root_scan_times_ms;
 116   WorkerDataArray<double> _last_satb_filtering_times_ms;
 117   WorkerDataArray<double> _last_update_rs_times_ms;
 118   WorkerDataArray<int>    _last_update_rs_processed_buffers;
 119   WorkerDataArray<double> _last_scan_rs_times_ms;
 120   WorkerDataArray<double> _last_obj_copy_times_ms;
 121   WorkerDataArray<double> _last_termination_times_ms;
 122   WorkerDataArray<size_t> _last_termination_attempts;
 123   WorkerDataArray<double> _last_gc_worker_end_times_ms;
 124   WorkerDataArray<double> _last_gc_worker_times_ms;
 125   WorkerDataArray<double> _last_gc_worker_other_times_ms;
 126 
 127   double _cur_collection_par_time_ms;
 128   double _cur_collection_code_root_fixup_time_ms;
 129 
 130   double _cur_clear_ct_time_ms;
 131   double _cur_ref_proc_time_ms;
 132   double _cur_ref_enq_time_ms;
 133 
 134   // Card Table Count Cache stats
 135   double _min_clear_cc_time_ms;         // min
 136   double _max_clear_cc_time_ms;         // max
 137   double _cur_clear_cc_time_ms;         // clearing time during current pause
 138   double _cum_clear_cc_time_ms;         // cummulative clearing time
 139   jlong  _num_cc_clears;                // number of times the card count cache has been cleared
 140 
 141   double _cur_collection_start_sec;
 142   double _root_region_scan_wait_time_ms;
 143 
 144   double _recorded_young_cset_choice_time_ms;
 145   double _recorded_non_young_cset_choice_time_ms;
 146 
 147   double _recorded_young_free_cset_time_ms;
 148   double _recorded_non_young_free_cset_time_ms;
 149 
 150   double _cur_verify_before_time_ms;
 151   double _cur_verify_after_time_ms;
 152 
 153   // Helper methods for detailed logging
 154   void print_stats(int level, const char* str, double value);
 155   void print_stats(int level, const char* str, double value, int workers);
 156 
 157  public:
 158   G1GCPhaseTimes(uint max_gc_threads);
 159   void note_gc_start(uint active_gc_threads);
 160   void note_gc_end();


 208   void record_par_time(double ms) {
 209     _cur_collection_par_time_ms = ms;
 210   }
 211 
 212   void record_code_root_fixup_time(double ms) {
 213     _cur_collection_code_root_fixup_time_ms = ms;
 214   }
 215 
 216   void record_ref_proc_time(double ms) {
 217     _cur_ref_proc_time_ms = ms;
 218   }
 219 
 220   void record_ref_enq_time(double ms) {
 221     _cur_ref_enq_time_ms = ms;
 222   }
 223 
 224   void record_root_region_scan_wait_time(double time_ms) {
 225     _root_region_scan_wait_time_ms = time_ms;
 226   }
 227 
 228   void record_cc_clear_time_ms(double ms);
 229 
 230   void record_young_free_cset_time_ms(double time_ms) {
 231     _recorded_young_free_cset_time_ms = time_ms;
 232   }
 233 
 234   void record_non_young_free_cset_time_ms(double time_ms) {
 235     _recorded_non_young_free_cset_time_ms = time_ms;
 236   }
 237 
 238   void record_young_cset_choice_time_ms(double time_ms) {
 239     _recorded_young_cset_choice_time_ms = time_ms;
 240   }
 241 
 242   void record_non_young_cset_choice_time_ms(double time_ms) {
 243     _recorded_non_young_cset_choice_time_ms = time_ms;
 244   }
 245 
 246   void record_cur_collection_start_sec(double time_ms) {
 247     _cur_collection_start_sec = time_ms;
 248   }
 249 


   1 /*
   2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 114   WorkerDataArray<double> _last_gc_worker_start_times_ms;
 115   WorkerDataArray<double> _last_ext_root_scan_times_ms;
 116   WorkerDataArray<double> _last_satb_filtering_times_ms;
 117   WorkerDataArray<double> _last_update_rs_times_ms;
 118   WorkerDataArray<int>    _last_update_rs_processed_buffers;
 119   WorkerDataArray<double> _last_scan_rs_times_ms;
 120   WorkerDataArray<double> _last_obj_copy_times_ms;
 121   WorkerDataArray<double> _last_termination_times_ms;
 122   WorkerDataArray<size_t> _last_termination_attempts;
 123   WorkerDataArray<double> _last_gc_worker_end_times_ms;
 124   WorkerDataArray<double> _last_gc_worker_times_ms;
 125   WorkerDataArray<double> _last_gc_worker_other_times_ms;
 126 
 127   double _cur_collection_par_time_ms;
 128   double _cur_collection_code_root_fixup_time_ms;
 129 
 130   double _cur_clear_ct_time_ms;
 131   double _cur_ref_proc_time_ms;
 132   double _cur_ref_enq_time_ms;
 133 







 134   double _cur_collection_start_sec;
 135   double _root_region_scan_wait_time_ms;
 136 
 137   double _recorded_young_cset_choice_time_ms;
 138   double _recorded_non_young_cset_choice_time_ms;
 139 
 140   double _recorded_young_free_cset_time_ms;
 141   double _recorded_non_young_free_cset_time_ms;
 142 
 143   double _cur_verify_before_time_ms;
 144   double _cur_verify_after_time_ms;
 145 
 146   // Helper methods for detailed logging
 147   void print_stats(int level, const char* str, double value);
 148   void print_stats(int level, const char* str, double value, int workers);
 149 
 150  public:
 151   G1GCPhaseTimes(uint max_gc_threads);
 152   void note_gc_start(uint active_gc_threads);
 153   void note_gc_end();


 201   void record_par_time(double ms) {
 202     _cur_collection_par_time_ms = ms;
 203   }
 204 
 205   void record_code_root_fixup_time(double ms) {
 206     _cur_collection_code_root_fixup_time_ms = ms;
 207   }
 208 
 209   void record_ref_proc_time(double ms) {
 210     _cur_ref_proc_time_ms = ms;
 211   }
 212 
 213   void record_ref_enq_time(double ms) {
 214     _cur_ref_enq_time_ms = ms;
 215   }
 216 
 217   void record_root_region_scan_wait_time(double time_ms) {
 218     _root_region_scan_wait_time_ms = time_ms;
 219   }
 220 


 221   void record_young_free_cset_time_ms(double time_ms) {
 222     _recorded_young_free_cset_time_ms = time_ms;
 223   }
 224 
 225   void record_non_young_free_cset_time_ms(double time_ms) {
 226     _recorded_non_young_free_cset_time_ms = time_ms;
 227   }
 228 
 229   void record_young_cset_choice_time_ms(double time_ms) {
 230     _recorded_young_cset_choice_time_ms = time_ms;
 231   }
 232 
 233   void record_non_young_cset_choice_time_ms(double time_ms) {
 234     _recorded_non_young_cset_choice_time_ms = time_ms;
 235   }
 236 
 237   void record_cur_collection_start_sec(double time_ms) {
 238     _cur_collection_start_sec = time_ms;
 239   }
 240