-
Bug
-
Resolution: Duplicate
-
P5
-
hs25, 10
Running this class:
public class Threads {
public static void main(String [] args) throws Exception {
int c = Integer.parseInt(args[0]);
for (int i = 0; i < c; i++) {
MyThread t = new MyThread();
t.start();
}
Thread.sleep(5000);
}
static class MyThread extends Thread {
public static Object dummy;
public void run() {
try {
dummy = new byte[0];
Thread.sleep(10000000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
with:
java -Xmn3520m -Xms3584m -Xmx3584m -XX:+PrintGC -XX:+PrintGCTimeStamps Threads 64
starts a young GC immediately:
0.075: [GC (Allocation Failure) 2703360K->488K(3219456K), 0.0012880 secs]
-XX:+PrintTLAB gives:
TLAB: gc thread: 0x00007f7204153800 [id: 17869] desired_size: 54067KB slow allocs: 0 refill waste: 865072B alloc: 1.00000 2703360KB refills: 1 waste 100.0% gc: 55364248B slow: 0B fast: 0B
public class Threads {
public static void main(String [] args) throws Exception {
int c = Integer.parseInt(args[0]);
for (int i = 0; i < c; i++) {
MyThread t = new MyThread();
t.start();
}
Thread.sleep(5000);
}
static class MyThread extends Thread {
public static Object dummy;
public void run() {
try {
dummy = new byte[0];
Thread.sleep(10000000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
with:
java -Xmn3520m -Xms3584m -Xmx3584m -XX:+PrintGC -XX:+PrintGCTimeStamps Threads 64
starts a young GC immediately:
0.075: [GC (Allocation Failure) 2703360K->488K(3219456K), 0.0012880 secs]
-XX:+PrintTLAB gives:
TLAB: gc thread: 0x00007f7204153800 [id: 17869] desired_size: 54067KB slow allocs: 0 refill waste: 865072B alloc: 1.00000 2703360KB refills: 1 waste 100.0% gc: 55364248B slow: 0B fast: 0B
- duplicates
-
JDK-8200365 TestOptionsWithRanges.java of '-XX:TLABWasteTargetPercent=100' fails intermittently
- Resolved