-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b29
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085693 | emb-9 | Marcus Lagergren | P4 | Resolved | Fixed | team |
JDK-8064205 | 8u45 | Marcus Lagergren | P4 | Resolved | Fixed | b01 |
JDK-8056165 | 8u40 | Marcus Lagergren | P4 | Resolved | Fixed | b04 |
JDK-8070442 | emb-8u47 | Marcus Lagergren | P4 | Resolved | Fixed | team |
Profiling a simple scenario:
$ ~/Install/jdk9u20/bin/java -jar dist/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time test/script/basic/compile-octane.js -- --iterations 5
...yields a few simple low-hanging fruits, here is one of them. Out of 320 seconds of run, 20 seconds is spent here:
19.750 jdk.nashorn.internal.ir.IdentNode.accept(jdk.nashorn.internal.ir.visitor.NodeVisitor)
19.750 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode(jdk.nashorn.internal.ir.IdentNode)
19.140 java.lang.UnsupportedOperationException.<init>()
19.150 java.lang.RuntimeException.<init>()
19.150 java.lang.Exception.<init>()
19.150 java.lang.Throwable.<init>()
20.290 java.lang.Throwable.fillInStackTrace()
Please throw some different from UOE from ApplySpecialization$1.leaveIdentNode(), the exception with fillInStackTrace() overridden should be best. You may also consider throwing the pre-cached exception from the static field, if that is not messy for the Nashorn code.
$ ~/Install/jdk9u20/bin/java -jar dist/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time test/script/basic/compile-octane.js -- --iterations 5
...yields a few simple low-hanging fruits, here is one of them. Out of 320 seconds of run, 20 seconds is spent here:
19.750 jdk.nashorn.internal.ir.IdentNode.accept(jdk.nashorn.internal.ir.visitor.NodeVisitor)
19.750 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode(jdk.nashorn.internal.ir.IdentNode)
19.140 java.lang.UnsupportedOperationException.<init>()
19.150 java.lang.RuntimeException.<init>()
19.150 java.lang.Exception.<init>()
19.150 java.lang.Throwable.<init>()
20.290 java.lang.Throwable.fillInStackTrace()
Please throw some different from UOE from ApplySpecialization$1.leaveIdentNode(), the exception with fillInStackTrace() overridden should be best. You may also consider throwing the pre-cached exception from the static field, if that is not messy for the Nashorn code.
- backported by
-
JDK-8056165 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode() should throw stackless Exception
-
- Resolved
-
-
JDK-8064205 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode() should throw stackless Exception
-
- Resolved
-
-
JDK-8070442 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode() should throw stackless Exception
-
- Resolved
-
-
JDK-8085693 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode() should throw stackless Exception
-
- Resolved
-