mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6858496: Clear all SoftReferences before an out-of-memory due to GC overhead limit
Ensure a full GC that clears SoftReferences before throwing an out-of-memory Reviewed-by: ysr, jcoomes
This commit is contained in:
parent
ba815bf09e
commit
f5197d0d36
26 changed files with 543 additions and 364 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -44,8 +44,8 @@ class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
|
|||
PerfVariable* _live_space;
|
||||
PerfVariable* _free_space;
|
||||
PerfVariable* _avg_base_footprint;
|
||||
PerfVariable* _gc_time_limit_exceeded;
|
||||
PerfVariable* _live_at_last_full_gc;
|
||||
PerfVariable* _gc_overhead_limit_exceeded_counter;
|
||||
PerfVariable* _live_at_last_full_gc_counter;
|
||||
PerfVariable* _old_capacity;
|
||||
PerfVariable* _boundary_moved;
|
||||
|
||||
|
@ -169,6 +169,14 @@ class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
|
|||
(jlong)(ps_size_policy()->major_pause_young_slope() * 1000)
|
||||
);
|
||||
}
|
||||
inline void update_gc_overhead_limit_exceeded_counter() {
|
||||
_gc_overhead_limit_exceeded_counter->set_value(
|
||||
(jlong) ps_size_policy()->gc_overhead_limit_exceeded());
|
||||
}
|
||||
inline void update_live_at_last_full_gc_counter() {
|
||||
_live_at_last_full_gc_counter->set_value(
|
||||
(jlong)(ps_size_policy()->live_at_last_full_gc()));
|
||||
}
|
||||
|
||||
inline void update_scavenge_skipped(int cause) {
|
||||
_scavenge_skipped->set_value(cause);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue