RFR: 8248321: [JVMCI] improve libgraal logging and fatal error handling
Tom Rodriguez
tom.rodriguez at oracle.com
Thu Jul 2 15:50:43 UTC 2020
Looks good.
tom
Doug Simon wrote on 7/1/20 2:55 PM:
> Please review this change that:
>
> 1. Sends log output from libgraal for options such as -Dlibgraal.PrintGC=true to HotSpot's tty stream.
> 2. Forwards a fatal error in libgraal to HotSpot's report_fatal function so that a proper hs_err_pid crash log is produced.
> 3. Adds coarse grained JVMCI events to the hs_eer_pid crash log that can help diagnose libgraal crashes.
>
> https://bugs.openjdk.java.net/browse/JDK-8248321
> https://cr.openjdk.java.net/~dnsimon/8248321/webrev.00/
>
> Testing: hs-tier1,hs-tier2,hs-tier3-graal,hs-tier4-graal
>
> I’ve also tested this on a JDK 16 libgraal build (thanks to Bob’s recent fixes <https://github.com/oracle/graal/pull/2635>) using the -Dlibgraal.CrashAtIsFatal=true option introduced for testing purposes. Here are extracts from the resulting hs_err_pid log:
>
> Stack: [0x000070000404e000,0x000070000424e000], sp=0x000070000424cfa0, free space=2043k
> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V [libjvm.dylib+0xa74706] _ZN7VMError14report_and_dieEiPKcS1_P13__va_list_tagP6ThreadPhPvS7_S1_im+0x696
> V [libjvm.dylib+0xa74dcb] _ZN7VMError14report_and_dieEP6ThreadPvPKciS4_S4_P13__va_list_tag+0x3b
> V [libjvm.dylib+0x2ffeb6] _Z12report_fatalPKciS0_z+0xb6
> V [libjvm.dylib+0x623b2e] _ZL6_fatalv+0x1e
> C [libjvmcicompiler.dylib+0x50c2e] FunctionPointerLogHandler_fatalError_45f632dec0d6a0795524f3a791e61bc3381552ca+0x5e
> C [libjvmcicompiler.dylib+0x6251d9] GraalCompiler_notifyCrash_6e5abb0717b70e82f6be0f6751e33644079f0e7c+0x199
> C [libjvmcicompiler.dylib+0x622f36] GraalCompiler_checkForRequestedCrash_a1f0e6b1c079f96a46be20bd2ccc87fb7db83871+0x256
> C [libjvmcicompiler.dylib+0x623929] GraalCompiler_compile_5fc27c66103532b8aadfba9a53a0cfc56727e415+0x209
> C [libjvmcicompiler.dylib+0x623e80] GraalCompiler_compileGraph_7c727cf4f7ff3555660a81773d74fd53c28861a9+0x1e0
> C [libjvmcicompiler.dylib+0x742259] HotSpotGraalCompiler_compileHelper_d3a966217707633929a5b5a4a7670fbd583caf11+0x419
> C [libjvmcicompiler.dylib+0x741d95] HotSpotGraalCompiler_compile_80896636e2e15249ae0fc7c3c7f4cb060aca0523+0x165
>
>
> JVMCI Events (8 events):
> Event: 0.015 Thread 0x00007fa00b011600 created new JVMCI runtime 0 (0x00007fa01af24040)
> Event: 0.015 Thread 0x00007fa00b011600 created new JVMCI runtime -1 (0x00007fa01af240a0)
> Event: 0.072 Thread 0x00007fa01b02bc00 loaded JVMCI shared library from /Users/dnsimon/hs/graal/sdk/mxbuild/darwin-amd64/GRAALVM_LIBGRAAL_JAVA16/graalvm-libgraal-java16-20.2.0-dev/lib/libjvmcicompiler.dylib
> Event: 0.073 Thread 0x00007fa01b02bc00 created JavaVM[1]@0x00000001409a3cb0 for JVMCI runtime 0
> Event: 0.073 Thread 0x00007fa01b02bc00 initializing JVMCI runtime 0
> Event: 0.074 Thread 0x00007fa01b02bc00 initialized JVMCI runtime 0
> Event: 0.082 Thread 0x00007fa01b02bc00 initializing JVMCI runtime -1
> Event: 0.088 Thread 0x00007fa01b02bc00 initialized JVMCI runtime -1
>
> -Doug
>
>
More information about the hotspot-compiler-dev
mailing list