GC needs pre-barrier(G1) and post-barrier(G1 and CMS) for a StoreP. However, the
corresponding StoreP may be optimized away in C2 optimization. This may cause some
assertion failures (JDK-6636138) and performance issue. Here is the sample code
from bugJDK-6636138, which has an assertion failure in superword optimization:
public class Tester {
public class Tester {
static String var_bad = "Anything"; // static is important here
public static void main(String[] args)
{
for (int i=0; i < 1000; var_bad = var_bad, i++);
System.out.println("var_bad: " + var_bad);
}
}
"var_bad = var_bad" is useless and will be optimizd away. However, for any concurrent garbage collection, the post barrier (StoreCM, for example) is still
there, and its oop_store is no longer a store node. This cause the assertion failure.
The assertion failure occur with -XX:+UseConcMarkSweepGC
This is an RFE, not a bug. The assertion failure mentioned above was fixed (avoided, actually) byJDK-6636138.
corresponding StoreP may be optimized away in C2 optimization. This may cause some
assertion failures (
from bug
public class Tester {
public class Tester {
static String var_bad = "Anything"; // static is important here
public static void main(String[] args)
{
for (int i=0; i < 1000; var_bad = var_bad, i++);
System.out.println("var_bad: " + var_bad);
}
}
"var_bad = var_bad" is useless and will be optimizd away. However, for any concurrent garbage collection, the post barrier (StoreCM, for example) is still
there, and its oop_store is no longer a store node. This cause the assertion failure.
The assertion failure occur with -XX:+UseConcMarkSweepGC
This is an RFE, not a bug. The assertion failure mentioned above was fixed (avoided, actually) by
- relates to
-
JDK-6636138 UseSuperWord enabled failure
-
- Closed
-
-
JDK-6877254 Server vm crashes with "no branches off of store slice" when run with CMS and UseSuperWord (default)
-
- Closed
-