RFR: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations [v3]

Cesar Soares Lucas cslucas at openjdk.org
Thu Jan 23 23:28:01 UTC 2025


> Currently, `-XX:+PrintCompilation` does not print "hosted" JVMCI compilations (i.e. JVMCI compilations not triggered by the `CompilerBroker` but e.g. by the Truffle framework). On the other hand, if such an nmethod which results from a "hosted" compilation gets deoptimized, it will be printed by `-XX:+PrintCompilation` (with a compilation ID that doesn't appear anywhere before in the compilation log.
> 
> This pull request is intended to fix that. The snippet below is an example of output printed (with PrintCompilation and CIPrintCompilerName enabled) for Truffle hosted compilations using this patch.
> 
> 
> 783 JVMCI:4667       4       com.oracle.truffle.runtime.OptimizedCallTarget::callBoundary (19 bytes)   (hosted JVMCI compilation)
> 785 JVMCI:5342       4       com.oracle.truffle.runtime.hotspot.HotSpotFastThreadLocal::get (4 bytes)   (hosted JVMCI compilation)
> 786 JVMCI:5411       4       com.oracle.truffle.runtime.hotspot.HotSpotFastThreadLocal::set (5 bytes)   (hosted JVMCI compilation)
> 1582 JVMCI:10125       4       com.oracle.truffle.runtime.OptimizedCallTarget::profiledPERoot (51 bytes)   (hosted JVMCI compilation)
> 1591 JVMCI:10899       4       com.oracle.truffle.runtime.OptimizedCallTarget::profiledPERoot (51 bytes)   (hosted JVMCI compilation)
> 1652 JVMCI:11064       4       com.oracle.truffle.runtime.OptimizedCallTarget::profiledPERoot (51 bytes)   (hosted JVMCI compilation)
> 1656 JVMCI:11175       4       com.oracle.truffle.runtime.OptimizedCallTarget::profiledPERoot (51 bytes)   (hosted JVMCI compilation)

Cesar Soares Lucas has updated the pull request incrementally with one additional commit since the last revision:

  Fix typo.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/23278/files
  - new: https://git.openjdk.org/jdk/pull/23278/files/92f15db7..f49ca1ee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23278&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23278&range=01-02

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/23278.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23278/head:pull/23278

PR: https://git.openjdk.org/jdk/pull/23278


More information about the hotspot-compiler-dev mailing list