RFR (M): 7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
Christian Thalinger
christian.thalinger at oracle.com
Thu Sep 27 16:34:50 PDT 2012
http://cr.openjdk.java.net/~twisti/7200949
7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
Reviewed-by:
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.
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.
src/cpu/x86/vm/templateTable_x86_32.cpp
src/cpu/x86/vm/templateTable_x86_64.cpp
src/share/vm/ci/ciClassList.hpp
src/share/vm/ci/ciObject.hpp
src/share/vm/ci/ciObjectFactory.cpp
src/share/vm/ci/ciSignature.cpp
src/share/vm/ci/ciSignature.hpp
src/share/vm/ci/ciStreams.cpp
src/share/vm/ci/ciStreams.hpp
src/share/vm/classfile/systemDictionary.cpp
src/share/vm/classfile/systemDictionary.hpp
src/share/vm/interpreter/interpreterRuntime.cpp
src/share/vm/interpreter/linkResolver.cpp
src/share/vm/interpreter/linkResolver.hpp
src/share/vm/interpreter/rewriter.cpp
src/share/vm/interpreter/rewriter.hpp
src/share/vm/oops/constantPool.cpp
src/share/vm/oops/constantPool.hpp
src/share/vm/oops/cpCache.cpp
src/share/vm/oops/cpCache.hpp
More information about the hotspot-compiler-dev
mailing list