-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
BMH$Species_* classes are loaded using bootstrap class loader and hence can't be GCed.
src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java:
// load class
final byte[] classFile = cw.toByteArray();
InvokerBytecodeGenerator.maybeDump(className, classFile);
Class<? extends BoundMethodHandle> bmhClass =
//UNSAFE.defineAnonymousClass(BoundMethodHandle.class, classFile, null).asSubclass(BoundMethodHandle.class);
UNSAFE.defineClass(className, classFile, 0, classFile.length,
BoundMethodHandle.class.getClassLoader(), null)
.asSubclass(BoundMethodHandle.class);
Consider moving to VM anonymous classes instead. It means all references to Species_* field accessors in LambdaForms should be through method handles and not symbolic references.
src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java:
// load class
final byte[] classFile = cw.toByteArray();
InvokerBytecodeGenerator.maybeDump(className, classFile);
Class<? extends BoundMethodHandle> bmhClass =
//UNSAFE.defineAnonymousClass(BoundMethodHandle.class, classFile, null).asSubclass(BoundMethodHandle.class);
UNSAFE.defineClass(className, classFile, 0, classFile.length,
BoundMethodHandle.class.getClassLoader(), null)
.asSubclass(BoundMethodHandle.class);
Consider moving to VM anonymous classes instead. It means all references to Species_* field accessors in LambdaForms should be through method handles and not symbolic references.
- is blocked by
-
JDK-8078629 VM should constant fold Unsafe.get*() loads from final fields
- Resolved
- relates to
-
JDK-8068416 LFGarbageCollectedTest.java fails with OOME: "GC overhead limit exceeded"
- Resolved