< prev index next >
test/gc/arguments/TestTargetSurvivorRatioFlag.java
Print this page
*** 44,54 ****
import java.util.regex.Pattern;
import jdk.internal.misc.Unsafe;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Utils;
- import jdk.test.lib.unsafe.UnsafeHelper;
import sun.hotspot.WhiteBox;
/* In order to test that TargetSurvivorRatio affects survivor space occupancy
* we setup fixed MaxTenuringThreshold and then verifying that if size of allocated
* objects is lower than (survivor_size * TargetSurvivorRatio / 100) then objects
--- 44,53 ----
*** 247,257 ****
}
public static class TargetSurvivorRatioVerifier {
static final WhiteBox wb = WhiteBox.getWhiteBox();
! static final Unsafe unsafe = UnsafeHelper.getUnsafe();
// Desired size of memory allocated at once
public static final int CHUNK_SIZE = 1024;
// Length of byte[] array that will have occupy CHUNK_SIZE bytes in heap
public static final int ARRAY_LENGTH = CHUNK_SIZE - Unsafe.ARRAY_BYTE_BASE_OFFSET;
--- 246,256 ----
}
public static class TargetSurvivorRatioVerifier {
static final WhiteBox wb = WhiteBox.getWhiteBox();
! static final Unsafe unsafe = Unsafe.getUnsafe();
// Desired size of memory allocated at once
public static final int CHUNK_SIZE = 1024;
// Length of byte[] array that will have occupy CHUNK_SIZE bytes in heap
public static final int ARRAY_LENGTH = CHUNK_SIZE - Unsafe.ARRAY_BYTE_BASE_OFFSET;
< prev index next >