C++ Interpreter
Volker Simonis
volker.simonis at gmail.com
Mon Oct 1 10:41:23 PDT 2007
Hi,
as announced in the Changes for build 20 (see:
http://download.java.net/jdk7/changes/jdk7-b20.html) the C++
Interpreter that was formerly only available for the meanwhile closed
IA64 version of the Hotspot VM was "reintroduced" into the OpenJDK
workspace to resolve the Bug/RFE 6571248 (see
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571248)
I built a debug version of the VM (b20) on Solaris/SPARC with
CC_INTERP=1 to get a VM that uses the C++ Interpreter. The build
succeeded, however the VM crashes at the very beginning with a SIGBUS
if I call:
java -server -d64 -version
I started to debug the VM and found that everything seems to run fine
until the first call of BytecodeInterpreter::run() for the
'invokestatic' Bytecode for 'java/lang/Object::<clinit>' (well that's
really the very beginning:). It runs till line 2253 in
BytecodeInterpreter::run() where the interpreter finished the
interpretation of the invokestatic bytecode and returns, however this
return fails.
Here's the stack just before the return:
(dbx) where
current thread: t at 2
=>[1] BytecodeInterpreter::run(istate = 0xffffffff7adfe6b0), line 2253
in "bytecodeInterpreter.cpp"
[2] 0xffffffff76c05ce4(0xffffffff7ad09970, 0x9800, 0x0, 0x0, 0x0,
0xffffffff7adfdf91), at 0xffffffff76c05ce4
[3] 0xffffffff76c00318(0xffffffff7adfe960, 0xffffffff7adfecb8, 0xa,
0xfffffffef1007fa0, 0xffffffff76c058c0, 0xffffffff7adfecd0), at
0xffffffff76c00318
[4] JavaCalls::call_helper(result = 0xffffffff7adfecb0, m =
0xffffffff7adfebd8, args = 0xffffffff7adfecc0, __the_thread__ =
0x10013c8f8), line 382 in "javaCalls.cpp"
[5] os::os_exception_wrapper(f = 0xffffffff7d755e50 =
&JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),
value = 0xffffffff7adfecb0, method = 0xffffffff7adfebd8, args =
0xffffffff7adfecc0, thread = 0x10013c8f8), line 3908 in
"os_solaris.cpp"
[6] JavaCalls::call(result = 0xffffffff7adfecb0, method = CLASS,
args = 0xffffffff7adfecc0, __the_thread__ = 0x10013c8f8), line 301 in
"javaCalls.cpp"
[7] instanceKlass::call_class_initializer_impl(this_oop = CLASS,
__the_thread__ = 0x10013c8f8), line 629 in "instanceKlass.cpp"
[8] instanceKlass::call_class_initializer(this = 0xfffffffef1008030,
__the_thread__ = 0x10013c8f8), line 609 in "instanceKlass.cpp"
[9] instanceKlass::initialize_impl(this_oop = CLASS, __the_thread__
= 0x10013c8f8), line 359 in "instanceKlass.cpp"
[10] instanceKlass::initialize(this = 0xfffffffef1008030,
__the_thread__ = 0x10013c8f8), line 101 in "instanceKlass.cpp"
[11] instanceKlass::initialize_impl(this_oop = CLASS, __the_thread__
= 0x10013c8f8), line 336 in "instanceKlass.cpp"
[12] instanceKlass::initialize(this = 0xfffffffef1013a38,
__the_thread__ = 0x10013c8f8), line 101 in "instanceKlass.cpp"
[13] initialize_class(class_name = CLASS, __the_thread__ =
0x10013c8f8), line 835 in "thread.cpp"
[14] Threads::create_vm(args = 0xffffffff7adffda8, canTryAgain =
0xffffffff7adffcaf), line 2922 in "thread.cpp"
[15] JNI_CreateJavaVM(vm = 0xffffffff7adffef8, penv =
0xffffffff7adffef0, args = 0xffffffff7adffda8), line 3248 in "jni.cpp"
[16] InitializeJVM(pvm = 0xffffffff7adffef8, penv =
0xffffffff7adffef0, ifn = 0xffffffff7adfff08), line 1255 in "java.c"
[17] JavaMain(_args = 0xffffffff7fffebd8), line 404 in "java.c"
Further stepping gives:
(dbx) step
t at 2 (l at 2) stopped in BytecodeInterpreter::run at line 2671 in file
"bytecodeInterpreter.cpp"
2671 }
(dbx) step
t at 2 (l at 2) signal BUS (invalid address alignment) in (unknown) at
0xffffffff76c05e80
0xffffffff76c05e80: ldx [%l4 + 52], %l3
Current function is JavaCalls::call_helper
382 StubRoutines::call_stub()(
Any ideas or hints? Is the C++ Interpreter for Sparc really functional
as of now (b20) or has it just been integrated into OpenJDK as a hint
for developpers how it could work?
Any comments are highly welcome.
Regards,
Volker
More information about the hotspot-dev
mailing list