RFR: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations [v3]
Volker Simonis
simonis at openjdk.org
Mon Jan 27 15:55:46 UTC 2025
On Thu, 23 Jan 2025 23:28:01 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
>> 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.
Notice that `-XX:+CITime` is already aware of "hosted" JVMCI compilations. This is how the output looks if we only have "hosted" JVMCI compilations (i.e. `-XX:+UseJVMCICompiler`):
JVMCI CompileBroker Time:
Compile: 0,000 s
Install Code: 0,000 s (installs: 0, CodeBlob total size: 0, CodeBlob code size: 0)
JVMCI Hosted Time:
Install Code: 0,153 s (installs: 28, CodeBlob total size: 120888, CodeBlob code size: 80840)
And this is how it looks like with `-XX:+UseJVMCICompiler`:
JVMCI CompileBroker Time:
Compile: 21,054 s
Install Code: 0,307 s (installs: 841, CodeBlob total size: 985832, CodeBlob code size: 673184)
JVMCI Hosted Time:
Install Code: 0,165 s (installs: 31, CodeBlob total size: 146368, CodeBlob code size: 94808)
The "hosted" section has no entry for the compilation time, but it still prints the nunmber of compiled methods and their size.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23278#issuecomment-2616137006
More information about the hotspot-compiler-dev
mailing list