< prev index next >

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

Print this page




1286   size_t old_used_bytes_after_gc = _g1->old_regions_count() * HeapRegion::GrainBytes;
1287   size_t humongous_used_bytes_after_gc = _g1->humongous_regions_count() * HeapRegion::GrainBytes;
1288 
1289   size_t heap_capacity_bytes_after_gc = _g1->capacity();
1290   size_t eden_capacity_bytes_after_gc =
1291     (_young_list_target_length * HeapRegion::GrainBytes) - survivor_used_bytes_after_gc;
1292   size_t survivor_capacity_bytes_after_gc = _max_survivor_regions * HeapRegion::GrainBytes;
1293 
1294   log_info(gc, heap)("Eden: " SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
1295                      _eden_used_bytes_before_gc / K, eden_used_bytes_after_gc /K, eden_capacity_bytes_after_gc /K);
1296   log_info(gc, heap)("Survivor: " SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
1297                      _survivor_used_bytes_before_gc / K, survivor_used_bytes_after_gc /K, survivor_capacity_bytes_after_gc /K);
1298   log_info(gc, heap)("Old: " SIZE_FORMAT "K->" SIZE_FORMAT "K",
1299                      _old_used_bytes_before_gc / K, old_used_bytes_after_gc /K);
1300   log_info(gc, heap)("Humongous: " SIZE_FORMAT "K->" SIZE_FORMAT "K",
1301                      _humongous_used_bytes_before_gc / K, humongous_used_bytes_after_gc /K);
1302 
1303   MetaspaceAux::print_metaspace_change(_metaspace_used_bytes_before_gc);
1304 }
1305 
1306 void G1CollectorPolicy::print_phases(double pause_time_ms) {
1307   phase_times()->print(pause_time_ms);
1308 }
1309 
1310 void G1CollectorPolicy::adjust_concurrent_refinement(double update_rs_time,
1311                                                      double update_rs_processed_buffers,
1312                                                      double goal_ms) {
1313   DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
1314   ConcurrentG1Refine *cg1r = G1CollectedHeap::heap()->concurrent_g1_refine();
1315 
1316   if (G1UseAdaptiveConcRefinement) {
1317     const int k_gy = 3, k_gr = 6;
1318     const double inc_k = 1.1, dec_k = 0.9;
1319 
1320     int g = cg1r->green_zone();
1321     if (update_rs_time > goal_ms) {
1322       g = (int)(g * dec_k);  // Can become 0, that's OK. That would mean a mutator-only processing.
1323     } else {
1324       if (update_rs_time < goal_ms && update_rs_processed_buffers > g) {
1325         g = (int)MAX2(g * inc_k, g + 1.0);
1326       }
1327     }




1286   size_t old_used_bytes_after_gc = _g1->old_regions_count() * HeapRegion::GrainBytes;
1287   size_t humongous_used_bytes_after_gc = _g1->humongous_regions_count() * HeapRegion::GrainBytes;
1288 
1289   size_t heap_capacity_bytes_after_gc = _g1->capacity();
1290   size_t eden_capacity_bytes_after_gc =
1291     (_young_list_target_length * HeapRegion::GrainBytes) - survivor_used_bytes_after_gc;
1292   size_t survivor_capacity_bytes_after_gc = _max_survivor_regions * HeapRegion::GrainBytes;
1293 
1294   log_info(gc, heap)("Eden: " SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
1295                      _eden_used_bytes_before_gc / K, eden_used_bytes_after_gc /K, eden_capacity_bytes_after_gc /K);
1296   log_info(gc, heap)("Survivor: " SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
1297                      _survivor_used_bytes_before_gc / K, survivor_used_bytes_after_gc /K, survivor_capacity_bytes_after_gc /K);
1298   log_info(gc, heap)("Old: " SIZE_FORMAT "K->" SIZE_FORMAT "K",
1299                      _old_used_bytes_before_gc / K, old_used_bytes_after_gc /K);
1300   log_info(gc, heap)("Humongous: " SIZE_FORMAT "K->" SIZE_FORMAT "K",
1301                      _humongous_used_bytes_before_gc / K, humongous_used_bytes_after_gc /K);
1302 
1303   MetaspaceAux::print_metaspace_change(_metaspace_used_bytes_before_gc);
1304 }
1305 
1306 void G1CollectorPolicy::print_phases() {
1307   phase_times()->print();
1308 }
1309 
1310 void G1CollectorPolicy::adjust_concurrent_refinement(double update_rs_time,
1311                                                      double update_rs_processed_buffers,
1312                                                      double goal_ms) {
1313   DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
1314   ConcurrentG1Refine *cg1r = G1CollectedHeap::heap()->concurrent_g1_refine();
1315 
1316   if (G1UseAdaptiveConcRefinement) {
1317     const int k_gy = 3, k_gr = 6;
1318     const double inc_k = 1.1, dec_k = 0.9;
1319 
1320     int g = cg1r->green_zone();
1321     if (update_rs_time > goal_ms) {
1322       g = (int)(g * dec_k);  // Can become 0, that's OK. That would mean a mutator-only processing.
1323     } else {
1324       if (update_rs_time < goal_ms && update_rs_processed_buffers > g) {
1325         g = (int)MAX2(g * inc_k, g + 1.0);
1326       }
1327     }


< prev index next >