|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.utility.heap.HeapGrowthManager
public abstract class HeapGrowthManager
This class is responsible for growing and shrinking the heap size by observing heap utilization and GC load.
| Field Summary | |
|---|---|
private static double |
accumulatedGCTime
|
private static Extent |
currentHeapSize
The current heap size in bytes |
private static long |
endLastMajorGC
|
private static double[][] |
function
An encoding of the function used to manage heap size. |
private static double[][] |
generationalFunction
|
private static Extent |
initialHeapSize
The initial heap size (-Xms) in bytes |
private static Extent |
maxHeapSize
The maximum heap size (-Xms) in bytes |
private static double[][] |
nongenerationalFunction
|
| Constructor Summary | |
|---|---|
HeapGrowthManager()
|
|
| Method Summary | |
|---|---|
static void |
boot(Extent initial,
Extent max)
Initialize heap size parameters and the mechanisms used to adaptively change heap size. |
private static double |
computeHeapChangeRatio(double liveRatio)
|
static boolean |
considerHeapSize()
Decide how to grow/shrink the heap to respond to application's memory usage. |
static Extent |
getCurrentHeapSize()
|
static Extent |
getInitialHeapSize()
Return the initial heap size in bytes (as set by -Xms). |
static Extent |
getMaxHeapSize()
Return the max heap size in bytes (as set by -Xmx). |
static void |
overrideGrowHeapSize(Extent size)
Forcibly grow the heap by the given number of bytes. |
static void |
recordGCTime(double time)
Record the time taken by the current GC; used to compute gc load, one of the inputs into the heap size management function |
static void |
reset()
Reset timers used to compute gc load |
private static void |
sanityCheck()
Check that function satisfies the invariants |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Extent initialHeapSize
private static Extent maxHeapSize
private static Extent currentHeapSize
private static final double[][] generationalFunction
private static final double[][] nongenerationalFunction
private static final double[][] function
private static long endLastMajorGC
private static double accumulatedGCTime
| Constructor Detail |
|---|
public HeapGrowthManager()
| Method Detail |
|---|
public static void boot(Extent initial,
Extent max)
public static Extent getCurrentHeapSize()
public static Extent getMaxHeapSize()
public static Extent getInitialHeapSize()
public static void overrideGrowHeapSize(Extent size)
size - number of bytes to grow the heappublic static void recordGCTime(double time)
public static void reset()
public static boolean considerHeapSize()
private static double computeHeapChangeRatio(double liveRatio)
private static void sanityCheck()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||