comparison src/share/vm/gc_implementation/g1/g1MMUTracker.cpp @ 1594:b9bc732be7c0

Merge
author jmasa
date Thu, 10 Jun 2010 08:27:35 -0700
parents c18cbe5936b8 f16f1d7893de
children f95d63e2154a
comparison
equal deleted inserted replaced
1590:b17deadc902e 1594:b9bc732be7c0
79 longest_allowed = 0.0; 79 longest_allowed = 0.0;
80 double duration = end - start; 80 double duration = end - start;
81 81
82 remove_expired_entries(end); 82 remove_expired_entries(end);
83 if (_no_entries == QueueLength) { 83 if (_no_entries == QueueLength) {
84 // OK, right now when we fill up we bomb out 84 // OK, we've filled up the queue. There are a few ways
85 // there are a few ways of dealing with this "gracefully" 85 // of dealing with this "gracefully"
86 // increase the array size (:-) 86 // increase the array size (:-)
87 // remove the oldest entry (this might allow more GC time for 87 // remove the oldest entry (this might allow more GC time for
88 // the time slice than what's allowed) 88 // the time slice than what's allowed) - this is what we
89 // currently do
89 // consolidate the two entries with the minimum gap between them 90 // consolidate the two entries with the minimum gap between them
90 // (this might allow less GC time than what's allowed) 91 // (this might allow less GC time than what's allowed)
91 guarantee(NOT_PRODUCT(ScavengeALot ||) G1UseFixedWindowMMUTracker, 92
92 "array full, currently we can't recover unless +G1UseFixedWindowMMUTracker");
93 // In the case where ScavengeALot is true, such overflow is not 93 // In the case where ScavengeALot is true, such overflow is not
94 // uncommon; in such cases, we can, without much loss of precision 94 // uncommon; in such cases, we can, without much loss of precision
95 // or performance (we are GC'ing most of the time anyway!), 95 // or performance (we are GC'ing most of the time anyway!),
96 // simply overwrite the oldest entry in the tracker: this 96 // simply overwrite the oldest entry in the tracker.
97 // is also the behaviour when G1UseFixedWindowMMUTracker is enabled. 97
98 if (G1PolicyVerbose > 1) {
99 warning("MMU Tracker Queue overflow. Replacing earliest entry.");
100 }
101
98 _head_index = trim_index(_head_index + 1); 102 _head_index = trim_index(_head_index + 1);
99 assert(_head_index == _tail_index, "Because we have a full circular buffer"); 103 assert(_head_index == _tail_index, "Because we have a full circular buffer");
100 _tail_index = trim_index(_tail_index + 1); 104 _tail_index = trim_index(_tail_index + 1);
101 } else { 105 } else {
102 _head_index = trim_index(_head_index + 1); 106 _head_index = trim_index(_head_index + 1);