JDK-7200949 : JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-09-25
  • Updated: 2013-09-04
  • Resolved: 2012-10-01
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
7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
Relates :  
Description
The problem is in the declared signature returned by ciBytecodeStream::get_method which was added with 7192406.

We create a ciSignature object with the constant pool holder as accessing class.  ciEnv::get_klass_by_name_impl doesn't delegate to its parent class loaders and we can't call SystemDictionary::resolve_or_null because we are in the compiler thread.  Thus all lookups happen in the class loader of the accessing class.

This leads to supposedly unloaded classes like org/jruby/RubyString or even java/lang/Object.

Comments
Running JRuby's bench_base64.rb results in a lot of deoptimizations: $ export JAVA_HOME=/java/re/jdk/8/promoted/all/b52/binaries/solaris-x64 $ jruby -J-XX:-TieredCompilation -J-XX:+PrintCompilation ../rubybench/bench/time/bench_base64.rb 10 ... 6949 970 rubyjit.Base64$$decode64_856A11D3C68BA144BEA1408BDA78DA91A5C77E4217792713::__file__ (26 bytes) 6951 969 rubyjit.Base64$$decode64_856A11D3C68BA144BEA1408BDA78DA91A5C77E4217792713::__file__ (10 bytes) made not entrant 6951 92 % org.jruby.RubyFixnum::times @ 68 (110 bytes) 6951 970 rubyjit.Base64$$decode64_856A11D3C68BA144BEA1408BDA78DA91A5C77E4217792713::__file__ (26 bytes) made not entrant 6984 92 % org.jruby.RubyFixnum::times @ -2 (110 bytes) made not entrant ...
03-11-2012

http://cr.openjdk.java.net/~twisti/7200949
27-09-2012

EVALUATION The fix is to store the MethodType in the constant pool cache and using that type information instead of the declared method signature to create a ciSignature.
27-09-2012