cross compile openjdk8u102-b14, zeroshark, getFunctionAddress() return NULL when compile java.lang.String::equals
Zhu Yong
zhuyong.me at gmail.com
Mon Sep 26 10:30:30 UTC 2016
Dear All,
I am new to OpenJDK, I was assigned task to do some evaluation on OpenJDK
on ARM, both zero and zeroshark.
My Host is x86_64, boot JDK use 32bit JDK7 from Oracle, LLVM use 3.4.2,
cross compiled.
I have managed to cross compile oepnjdk jdk8u102-b14, zero variant for ARM,
java runs OK, but it's slow.
Ccross compile zeroshark variant for ARM passed with some patches found
online.
In sharkCompiler.cpp, I enabled MCJIT, forced MArch to ARM. When I run
"java" command on target, I saw assert:
# Internal Error
(/data/develop/kinetic/uboot-linux/buildroot-2011.05-2013_Q1.1/output/build/openjdk-jdk8u102-b14/hotspot/src/share/vm/shark/sharkCompiler.cpp:339),
pid=26316, tid=0x4d29f470
# assert(code != NULL) failed: code must be != NULL
To debug the failure, I added some debug message in both OpenJDK and LLVM,
and discovered
1. method java.lang.String::hashCode was compiled successfully from
module _normal_context->module()
2. When compile java.lang.String::equals method, call
of execution_engine()->getFunctionAddress(name); return NULL, this caused
the assert above.
3. From debug message I added in LLVM MCJIT::FindFunctionNamed(),
java.lang.String::equals function already in the finalized module
(normal). But it's not in RuntimeDyldImpl.GlobalSymbolTable , and that's
why MCJIT::getExistingSymbolAddress() can't find it.
4. Then I printed all symbols in RuntimeDyldImpl::loadObject(),
java.lang.String::equals was not in the symbol list.
What's the status for zeroshark in jdk8u? Any specific version of LLVM is
required? Is it stable?
Refer to the assert, method java.lang.String::equals is compiled into same
module as java.lang.String::hashCode , but not added into
RuntimeDyldImpl.GlobalSymbolTable, what should I do to make
java.lang.String::equals added into symbol table?
Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/zero-dev/attachments/20160926/4eb18ab6/attachment.html>
More information about the zero-dev
mailing list