Java 交叉编译OpenJDK jdk8u102-b14,针对ARM的zeroshark
在应用补丁后,我成功地交叉编译了OpenJDK jdk8u102-b14Java 交叉编译OpenJDK jdk8u102-b14,针对ARM的zeroshark,java,arm,cross-compiling,openjdk,Java,Arm,Cross Compiling,Openjdk,在应用补丁后,我成功地交叉编译了OpenJDK jdk8u102-b14zeroshark,主要是从。但是当我运行java时,我看到来自sharkCompiler.cpp:347:assert(code!=NULL)失败:代码必须是!=空 我使用的LLVM是3.4.2,为ARM与库FFI交叉编译,为ARM启用目标 从调试消息中,这是因为generate_native_codeforjava.lang.String::equalsgetNULL指针位于code=(address)execution
zeroshark
,主要是从。但是当我运行java
时,我看到来自sharkCompiler.cpp:347
:assert(code!=NULL)失败:代码必须是!=空
我使用的LLVM是3.4.2,为ARM与库FFI交叉编译,为ARM启用目标
从调试消息中,这是因为generate_native_code
forjava.lang.String::equals
getNULL
指针位于code=(address)execution\u engine()->getPointerToFunction
java.lang.String::hashCode
和java.lang.System::arraycopy
没有问题
这次失败的可能根本原因是什么?为什么来自同一个包的equals
失败时java.lang.String::hashCode
正常
[root@Z303XY84 ~]# /mnt/target/usr/lib/jvm/j2sdk-image/bin/java
Target Triple = arm-unknown-linux-gnu <<< debug message
compile_method: java.lang.String::hashCode
add_function : java.lang.String::hashCode
Function Name : java.lang.String::hashCode, OK
compile_method: java.lang.String::equals
add_function : java.lang.String::equals
Function Name : java.lang.String::equals, NULL <<<<<<<<< Here is the problem
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/sharkCompiler.cpp:347
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/output/build/openjdk-jdk8u102-b14/hotspot/src/share/vm/shark/sharkCompiler.cpp:347), pid=4204, tid=0x4d21f470
# assert(code != NULL) failed: code must be != NULL
#
# JRE version: OpenJDK Runtime Environment (8.0_102-b14) (build 1.8.0_102-fastdebug-8u102-b14-b14)
# Java VM: OpenJDK Shark VM (25.102-b14-fastdebug mixed mode linux-arm )
# Core dump written. Default location: /root/core or core.4204
#
# An error report file with more information is saved as:
# /root/hs_err_pid4204.log
generate_native_wrapper: java.lang.System::arraycopy
add_function : java.lang.System::arraycopy
Function Name : java.lang.System::arraycopy, OK
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
# [ timer expired, abort... ]
Aborted (core dumped)
[root@Z303XY84~]#/mnt/target/usr/lib/jvm/j2sdk image/bin/java
Target Triple=arm未知linux gnu我将使用已经测试过的Oracle版本。你可以尝试一个OpenJDK论坛,但这不是一个一般的Java编程问题,所以你可能只有在幸运的情况下才能在这里得到答案;而且里面没有任何东西需要修改代码之类的东西吗?@PeterLawrey是的,Oracle build在我们的平台上运行得很好。但是我们想在我们的平台上在OpenJDK zeroshark和Oracle SE之间做一个基准测试。@GhostCat不,我不确定。我使用Debian armel build的补丁,成功构建了OpenJDK zero虚拟机,并在我们的平台上运行,没有问题,只是与Oracle版本相比速度太慢。在zero的基础上,我想构建zeroshark来对Oracle JDK进行新一轮的基准测试。我知道这已经很旧了,但我想听听更新。我已经初步计划尝试构建sharkzero,但我正在尝试为我的端口获得一个干净的、可重复的构建,它是带有musl libc的mipsel。就我个人而言,我并不认为我不需要调试和修改Shark来让它工作,特别是因为它不再被维护——这是一个遗憾,因为实现JIT编译器的工作是巨大的。另外,我认为arm有一个本地的热点jit。