JDK-8014288 : perf regression in nashorn JDK-8008448.js test after 8008511 changes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25,7u60
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-05-09
  • Updated: 2014-11-18
  • Resolved: 2013-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u60Fixed 8Fixed hs25Fixed
Related Reports
Relates :  
Relates :  
Description
nashorn$ cd make
make$ $JAVA_HOME/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b87)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b30-internal-201304192059.ddaugher.merge_main_to_rt_b, mixed mode)

make$ ant clean
make$ and test
...

Total time: 1 minute 53 seconds

make$ $JAVA_HOME/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b87)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b30-internal-201304201113.sspitsyn.hotspot, mixed mode)

make$ ant clean
make$ and test
...

Total time: 10 minutes 10 seconds



Comments
Please refer to one of my earlier comments which includes the specific Nashorn version that had this issue. Don't use a current version!
18-11-2014

This works for me: % cd /net/sc11152541.us/export/home/sspitsyn/nashorn-jdk8/nashorn % time /java/re/jdk/1.9.0/latest/binaries/solaris-sparcv9/bin/java -showversion \ -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" \ -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG \ -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class I do not remember yet how to setup the nashorn repo and where I took it.
14-11-2014

How do I run this? I did 'make all' but there's no build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class file. time $JAVA_HOME/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class
14-11-2014

7u60-critical-request justification: This bug fix is better to be in the release because it is a part of the JSR-292 support in the JVMTI HotSwap API (includes RedefineClasses, RetransformClasses and PopFrame). This bug is one of 12 bug fixes that depend on each other and must be integrated in the order: https://jbs.oracle.com/bugs/browse/JDK-7194607 https://jbs.oracle.com/bugs/browse/JDK-8005128 https://jbs.oracle.com/bugs/browse/JDK-8006542 https://jbs.oracle.com/bugs/browse/JDK-8006546 https://jbs.oracle.com/bugs/browse/JDK-8006731 https://jbs.oracle.com/bugs/browse/JDK-8008511 https://jbs.oracle.com/bugs/browse/JDK-8007037 https://jbs.oracle.com/bugs/browse/JDK-8014288 https://jbs.oracle.com/bugs/browse/JDK-8013945 https://jbs.oracle.com/bugs/browse/JDK-8014052 https://jbs.oracle.com/bugs/browse/JDK-7187554 https://jbs.oracle.com/bugs/browse/JDK-8023004 All the fixes above have been already integrated into the JDK 8 and tested in the hotspot-rt nightly for several months. Risk: low The fixes touch the JVMTI HotSwap API that includes RedefineClasses, RetransformClasses and PopFrame. The risk is only to introduce regressions in this part of the JVMTI implementation. This impacts only the debugging and profiling tools that use the JVMTI HotSwap feature. There are very small chances for regressions to sneak into the class file constant pool processing and method handles implementation. Webrevs and reviewers: The 7u60 webrevs location is: http://javaweb.sfbay.sun.com/java/svc/ss45998/webrevs/2013/hotspot/7u_port/ The fixes above were already passed the review process before integration into JDK 8. The reviewers were: twisti, jrose, coleenp, dholmes, etc. The 7u60 edition of fixes must be reviewed at least by jrose and twisti. Level of effort: All fixes need a secondary review phase after rebase from jdk8 to 7u60 repository. Testing coverage: The folllowing test suites must be run to ensure correctness of the fixes: JTREG tests: com/sun/jdi, java/lang/instrument NSK tests: vm.mlvm.testlist, nsk.jvmti.testlist, nsk.jdi.testlist, nsk.jdwp.testlist Result of not integrating: The users will not be able to use HotSwap technology for debuging and profiling Java code that depends on the JSR-292 implementation. In that case the integration of these fixes will have to be requested/escalated in 7 updates by the tool vendors and/or customers.
10-01-2014

The fix was sent to the open review. The decision is to get rid of the field MemberName's for now as they are not used yet. Use the m->method_idnum() for direct indexing into the MemberNameTable.
23-05-2013

I've implemented an optimized approach. The performance looks good: ################## sspitsyn@sc11152541 time $H0/hs25/hsx0/solaris-sparc/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b84) Java HotSpot(TM) Server VM (build 25.0-b32-internal, mixed mode) [TestNG] Running: Command line suite Test(compile, run): test/script/basic/JDK-8008448.js =============================================== Command line suite Total tests run: 1, Failures: 0, Skips: 0 =============================================== 53.41u 0.79s 1:00.10 90.1% For comparison, this is the timing on the build before the integration of the 8008511 fix (with performance degradation): ################## sspitsyn@sc11152541 time $H0/hs25/hsx4/solaris-sparc/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b85) Java HotSpot(TM) Server VM (build 25.0-b30-internal-201304192059.ddaugher.merge_main_to_rt_b, mixed mode) [TestNG] Running: Command line suite Test(compile, run): test/script/basic/JDK-8008448.js =============================================== Command line suite Total tests run: 1, Failures: 0, Skips: 0 =============================================== 53.37u 0.74s 0:55.95 96.7% This is the timing with the 8008511 performance degradation: ################### sspitsyn@sc11152541 time $H0/hs25/hsx3/solaris-sparc/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b86) Java HotSpot(TM) Server VM (build 25.0-b30-internal-201304201113.sspitsyn.hotspot, mixed mode) [TestNG] Running: Command line suite Test(compile, run): test/script/basic/JDK-8008448.js =============================================== Command line suite Total tests run: 1, Failures: 0, Skips: 0 =============================================== 1393.79u 2.54s 23:42.42 98.1%
18-05-2013

Finally, I was able to reproduce it. :)
17-05-2013

cthaling@macbook:~/ws/nashorn/nashorn$ hg tip changeset: 248:18ce1cd3026c tag: tip user: attila date: Wed May 08 16:48:33 2013 +0200 summary: 8014225: Rerun only failed 262 tests $ time /java/re/jdk/8/promoted/all/b87/binaries/solaris-sparcv9/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b87) Java HotSpot(TM) Server VM (build 25.0-b28, mixed mode) [TestNG] Running: Command line suite Test(compile, run): test/script/basic/JDK-8008448.js =============================================== Command line suite Total tests run: 1, Failures: 0, Skips: 0 =============================================== real 0m36.070s user 1m35.048s sys 0m2.093s $ time /java/re/jdk/8/promoted/all/b88/binaries/solaris-sparcv9/bin/java -showversion -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b88) Java HotSpot(TM) Server VM (build 25.0-b30, mixed mode) [TestNG] Running: Command line suite Test(compile, run): test/script/basic/JDK-8008448.js =============================================== Command line suite Total tests run: 1, Failures: 0, Skips: 0 =============================================== real 19m12.175s user 20m21.031s sys 0m3.843s Can you try to run it manually with the command in the first comment?
16-05-2013

Very strange, but I do not observe this performance degradation. What is wrong in the outputs below? Are there any mistakes in the test runs? sspitsyn@sc11152541 pwd /net/sc11152541/export/home/sspitsyn/nashorn-jdk8/nashorn/make ----------------------------------------------------------------------- sspitsyn@sc11152541 $JAVA_HOME/bin/java -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b85) Java HotSpot(TM) Server VM (build 25.0-b30-internal-201304192059.ddaugher.merge_main_to_rt_b, mixed mode) sspitsyn@sc11152541 $JAVA_HOME/bin/java -d64 -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b85) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b30-internal-201304192059.ddaugher.merge_main_to_rt_b, mixed mode) sspitsyn@sc11152541 $JAVA_HOME/bin/java -client -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b85) Java HotSpot(TM) Client VM (build 25.0-b30-internal-201304192059.ddaugher.merge_main_to_rt_b, mixed mode) sspitsyn@sc11152541 ant clean . . . . . sspitsyn@sc11152541 ant test Buildfile: build.xml . . . . . . BUILD SUCCESSFUL Total time: 1 minute 6 seconds ----------------------------------------- ----------------------------------------------------------------------- sspitsyn@sc11152541 $JAVA_HOME/bin/java -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b86) Java HotSpot(TM) Server VM (build 25.0-b30-internal-201304201113.sspitsyn.hotspot, mixed mode) sspitsyn@sc11152541 $JAVA_HOME/bin/java -d64 -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b86) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b30-internal-201304201113.sspitsyn.hotspot, mixed mode) sspitsyn@sc11152541 $JAVA_HOME/bin/java -client -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b86) Java HotSpot(TM) Client VM (build 25.0-b30-internal-201304201113.sspitsyn.hotspot, mixed mode) sspitsyn@sc11152541 ant clean . . . . . sspitsyn@sc11152541 ant test Buildfile: build.xml . . . . . BUILD SUCCESSFUL Total time: 1 minute 18 seconds ------------------------------------------ Dan's build: 1 min 6 sec. My build: 1 min 18 sec. Do I have to run this on a different machine? My machine is sc11152541 (solaris-sparc DevOps)
16-05-2013

And a link to the Nashorn wiki which explains how to download and build it: https://wiki.openjdk.java.net/display/Nashorn/Main
09-05-2013

$ java -Dtest.js.roots=test/script/basic -Dtest.js.includes="JDK-8008448.js" -Djava.ext.dirs=dist/ -cp test/lib/testng.jar:build/test/classes/ org.testng.TestNG -testclass build/test/classes/jdk/nashorn/internal/test/framework/ScriptTest.class
09-05-2013