Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1MMUTracker.cpp @ 993:54b3b351d6f9
Merge
author | jrose |
---|---|
date | Wed, 23 Sep 2009 23:56:15 -0700 |
parents | e1fdf4fd34dc |
children | 89e0543e1737 |
comparison
equal
deleted
inserted
replaced
992:6a8ccac44f41 | 993:54b3b351d6f9 |
---|---|
35 | 35 |
36 /***** ALL TIMES ARE IN SECS!!!!!!! *****/ | 36 /***** ALL TIMES ARE IN SECS!!!!!!! *****/ |
37 | 37 |
38 G1MMUTracker::G1MMUTracker(double time_slice, double max_gc_time) : | 38 G1MMUTracker::G1MMUTracker(double time_slice, double max_gc_time) : |
39 _time_slice(time_slice), | 39 _time_slice(time_slice), |
40 _max_gc_time(max_gc_time), | 40 _max_gc_time(max_gc_time) { } |
41 _conc_overhead_time_sec(0.0) { } | |
42 | |
43 void | |
44 G1MMUTracker::update_conc_overhead(double conc_overhead) { | |
45 double conc_overhead_time_sec = _time_slice * conc_overhead; | |
46 if (conc_overhead_time_sec > 0.9 * _max_gc_time) { | |
47 // We are screwed, as we only seem to have <10% of the soft | |
48 // real-time goal available for pauses. Let's admit defeat and | |
49 // allow something more generous as a pause target. | |
50 conc_overhead_time_sec = 0.75 * _max_gc_time; | |
51 } | |
52 | |
53 _conc_overhead_time_sec = conc_overhead_time_sec; | |
54 } | |
55 | 41 |
56 G1MMUTrackerQueue::G1MMUTrackerQueue(double time_slice, double max_gc_time) : | 42 G1MMUTrackerQueue::G1MMUTrackerQueue(double time_slice, double max_gc_time) : |
57 G1MMUTracker(time_slice, max_gc_time), | 43 G1MMUTracker(time_slice, max_gc_time), |
58 _head_index(0), | 44 _head_index(0), |
59 _tail_index(trim_index(_head_index+1)), | 45 _tail_index(trim_index(_head_index+1)), |
126 double G1MMUTrackerQueue::longest_pause_internal(double current_time) { | 112 double G1MMUTrackerQueue::longest_pause_internal(double current_time) { |
127 double target_time = _max_gc_time; | 113 double target_time = _max_gc_time; |
128 | 114 |
129 while( 1 ) { | 115 while( 1 ) { |
130 double gc_time = | 116 double gc_time = |
131 calculate_gc_time(current_time + target_time) + _conc_overhead_time_sec; | 117 calculate_gc_time(current_time + target_time); |
132 double diff = target_time + gc_time - _max_gc_time; | 118 double diff = target_time + gc_time - _max_gc_time; |
133 if (!is_double_leq_0(diff)) { | 119 if (!is_double_leq_0(diff)) { |
134 target_time -= diff; | 120 target_time -= diff; |
135 if (is_double_leq_0(target_time)) { | 121 if (is_double_leq_0(target_time)) { |
136 target_time = -1.0; | 122 target_time = -1.0; |