-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b31
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085709 | emb-9 | Marcus Lagergren | P4 | Resolved | Fixed | team |
JDK-8064220 | 8u45 | Marcus Lagergren | P4 | Resolved | Fixed | b01 |
JDK-8058218 | 8u40 | Marcus Lagergren | P4 | Resolved | Fixed | b06 |
JDK-8070457 | emb-8u47 | Marcus Lagergren | P4 | Resolved | Fixed | team |
Running the fresh Nashorn with dumping all classes:
~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -jar ~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/ext/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time -d=generated/ test/script/basic/compile-octane.js -- --iterations 1
...yields an interesting tidbit: there are lots of trivial classes generated:
http://cr.openjdk.java.net/~shade/8057588/nashorn-generated-classes-1.list
Notice how bytecode sizes have a very long tail in lower-sized classes. 3300/4900 of all classes seem to be those tiny classes. Disassembling a few of those tiny classes yields the almost the same content:
Compiled from "file:/home/shade/trunks/jdk9-dev/nashorn/test/script/basic/../external/octane/pdfjs.js"
public class jdk.nashorn.internal.scripts.Script$Recompilation$235$1$pdfjs$cu2 extends jdk.nashorn.internal.scripts.JS {
public static final boolean strictMode;
}
...maybe we can cache them? Having all these tiny splices floating around are probably contaminating the symbol table with redundant string symbols from all those "jdk.nashorn.internal.scripts.Script$Recompilation$235$1$pdfjs$cu2".
~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -jar ~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/ext/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time -d=generated/ test/script/basic/compile-octane.js -- --iterations 1
...yields an interesting tidbit: there are lots of trivial classes generated:
http://cr.openjdk.java.net/~shade/8057588/nashorn-generated-classes-1.list
Notice how bytecode sizes have a very long tail in lower-sized classes. 3300/4900 of all classes seem to be those tiny classes. Disassembling a few of those tiny classes yields the almost the same content:
Compiled from "file:/home/shade/trunks/jdk9-dev/nashorn/test/script/basic/../external/octane/pdfjs.js"
public class jdk.nashorn.internal.scripts.Script$Recompilation$235$1$pdfjs$cu2 extends jdk.nashorn.internal.scripts.JS {
public static final boolean strictMode;
}
...maybe we can cache them? Having all these tiny splices floating around are probably contaminating the symbol table with redundant string symbols from all those "jdk.nashorn.internal.scripts.Script$Recompilation$235$1$pdfjs$cu2".
- backported by
-
JDK-8058218 Lots of trivial classes are generated by Nashorn compiler
- Resolved
-
JDK-8064220 Lots of trivial classes are generated by Nashorn compiler
- Resolved
-
JDK-8070457 Lots of trivial classes are generated by Nashorn compiler
- Resolved
-
JDK-8085709 Lots of trivial classes are generated by Nashorn compiler
- Resolved
- relates to
-
JDK-8057703 Still, lots of trivial classes are generated by Nashorn compiler
- Resolved