Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.cpp @ 1387:0bfd3fb24150
6858496: Clear all SoftReferences before an out-of-memory due to GC overhead limit.
Summary: Ensure a full GC that clears SoftReferences before throwing an out-of-memory
Reviewed-by: ysr, jcoomes
author | jmasa |
---|---|
date | Tue, 13 Apr 2010 13:52:10 -0700 |
parents | 473cce303f13 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1361:6b73e879f1c2 | 1387:0bfd3fb24150 |
---|---|
1 /* | 1 /* |
2 * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
115 cname = PerfDataManager::counter_name(name_space(), "avgBaseFootprint"); | 115 cname = PerfDataManager::counter_name(name_space(), "avgBaseFootprint"); |
116 _avg_base_footprint = PerfDataManager::create_variable(SUN_GC, cname, | 116 _avg_base_footprint = PerfDataManager::create_variable(SUN_GC, cname, |
117 PerfData::U_Bytes, (jlong) ps_size_policy()->avg_base_footprint()->average(), CHECK); | 117 PerfData::U_Bytes, (jlong) ps_size_policy()->avg_base_footprint()->average(), CHECK); |
118 | 118 |
119 cname = PerfDataManager::counter_name(name_space(), "gcTimeLimitExceeded"); | 119 cname = PerfDataManager::counter_name(name_space(), "gcTimeLimitExceeded"); |
120 _gc_time_limit_exceeded = PerfDataManager::create_variable(SUN_GC, cname, | 120 _gc_overhead_limit_exceeded_counter = |
121 PerfData::U_Events, ps_size_policy()->gc_time_limit_exceeded(), CHECK); | 121 PerfDataManager::create_variable(SUN_GC, cname, |
122 PerfData::U_Events, ps_size_policy()->gc_overhead_limit_exceeded(), CHECK); | |
122 | 123 |
123 cname = PerfDataManager::counter_name(name_space(), "liveAtLastFullGc"); | 124 cname = PerfDataManager::counter_name(name_space(), "liveAtLastFullGc"); |
124 _live_at_last_full_gc = PerfDataManager::create_variable(SUN_GC, cname, | 125 _live_at_last_full_gc_counter = |
126 PerfDataManager::create_variable(SUN_GC, cname, | |
125 PerfData::U_Bytes, ps_size_policy()->live_at_last_full_gc(), CHECK); | 127 PerfData::U_Bytes, ps_size_policy()->live_at_last_full_gc(), CHECK); |
126 | 128 |
127 cname = PerfDataManager::counter_name(name_space(), "majorPauseOldSlope"); | 129 cname = PerfDataManager::counter_name(name_space(), "majorPauseOldSlope"); |
128 _major_pause_old_slope = PerfDataManager::create_variable(SUN_GC, cname, | 130 _major_pause_old_slope = PerfDataManager::create_variable(SUN_GC, cname, |
129 PerfData::U_None, (jlong) 0, CHECK); | 131 PerfData::U_None, (jlong) 0, CHECK); |
187 | 189 |
188 update_major_pause_old_slope(); | 190 update_major_pause_old_slope(); |
189 update_minor_pause_old_slope(); | 191 update_minor_pause_old_slope(); |
190 update_major_pause_young_slope(); | 192 update_major_pause_young_slope(); |
191 update_minor_collection_slope_counter(); | 193 update_minor_collection_slope_counter(); |
194 update_gc_overhead_limit_exceeded_counter(); | |
195 update_live_at_last_full_gc_counter(); | |
192 } | 196 } |
193 } | 197 } |
194 | 198 |
195 void PSGCAdaptivePolicyCounters::update_counters() { | 199 void PSGCAdaptivePolicyCounters::update_counters() { |
196 if (UsePerfData) { | 200 if (UsePerfData) { |