-
Enhancement
-
Resolution: Fixed
-
P4
-
14
-
b21
Object.java currently registers various native functions via the registerNatives facility.
private static native void registerNatives();
static {
registerNatives();
}
Not costly in and off itself, but this has the side effect that these two methods are taken into account every time the VM has to generate default methods and overpasses for some class during class load, which can take up substantial time. When prototypingJDK-8219713, explicitly excluding these two methods showed some improvement to default method generation, but it was decided against adding such special cases.
If we instead can get rid of the Object <clinit> and the registerNatives altogether we get the same (or a slightly better) speedup. This effectively reduces memory use and instructions retired doing default method generation by 3-5%:
http://cr.openjdk.java.net/~redestad/scratch/object_registerNatives.00/
private static native void registerNatives();
static {
registerNatives();
}
Not costly in and off itself, but this has the side effect that these two methods are taken into account every time the VM has to generate default methods and overpasses for some class during class load, which can take up substantial time. When prototyping
If we instead can get rid of the Object <clinit> and the registerNatives altogether we get the same (or a slightly better) speedup. This effectively reduces memory use and instructions retired doing default method generation by 3-5%:
http://cr.openjdk.java.net/~redestad/scratch/object_registerNatives.00/
- csr for
-
JDK-8232801 Move Object.registerNatives into HotSpot
-
- Closed
-