RFR: 8329421: Native methods can not be selectively printed [v2]
Wang Haomin
wanghaomin at openjdk.org
Wed Jun 5 10:11:02 UTC 2024
On Tue, 2 Apr 2024 07:23:25 GMT, Volker Simonis <simonis at openjdk.org> wrote:
>> Native methods (i.e. "native wrappers") can not be selectively printed with `-XX:CompileCommand=print,class::method`. Currently the only way to print native methods is to use the global `-XX:+PrintAssembly` option. But this prints *all* compiled methods which can be too much if we're just interested in a specific native wrapper. There's no reason to not apply `-XX:CompileCommand` options correctly to native methods as well.
>
> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>
> Add test for -XX:+PrintNativeNMethods
Hi @simonis , I encountered a build error after this commit. When `make images` using congiure `--with-jvm-variants=core`, the error is as follows:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000fffdea9ad1f4, pid=1696170, tid=1696241
#
# JRE version: OpenJDK Runtime Environment (23.0) (fastdebug build 23-internal-adhoc.wanghaomin.jdk-ls)
# Java VM: OpenJDK 64-Bit Core VM (fastdebug 23-internal-adhoc.wanghaomin.jdk-ls, interpreted mode, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x8ed1f4] BasicMatcher::match(methodHandle const&)+0x15c
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/wanghaomin/jdk-ls/make/core.1696170)
#
# An error report file with more information is saved as:
# /home/wanghaomin/jdk-ls/make/hs_err_pid1696170.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
/usr/bin/bash: line 1: 1696170 Aborted (core dumped) /home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/jdk/bin/javac -g -Xlint:all -source 23 -target 23 -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii -Werror --add-modules jdk.compiler,jdk.jdeps --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED -Xlint:-options -XDmodifiedInputs=/home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS_batch.modfiles.fixed -d /home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac @/home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS
_batch.filelist > >(/usr/bin/tee -a /home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS_batch.log) 2> >(/usr/bin/tee -a /home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS_batch.log >&2)
gmake[3]: *** [Gendata.gmk:64: /home/wanghaomin/jdk-ls/build/linux-aarch64-core-fastdebug/buildtools/create_symbols_javac/_the.COMPILE_CREATE_SYMBOLS_batch] Error 134
gmake[2]: *** [make/Main.gmk:147: jdk.compiler-gendata] Error 2
gmake[2]: *** Waiting for unfinished jobs....
ERROR: Build failed for targets 'clean images' in configuration 'linux-aarch64-core-fastdebug' (exit code 2)
Stopping javac server
Could you solve this problem?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18567#issuecomment-2149408243
More information about the hotspot-dev
mailing list