RFR(XS): -XX:+CITime triggers guarantee(events != NULL) in jvmci.cpp

Doug Simon doug.simon at oracle.com
Fri Jul 24 13:21:14 UTC 2020


This is not quite right. UseJVMCICompiler means “use JVMCI compiler as top tier JIT compiler”. It is still possible to use the JVMCI compiler via its Java API without using it as the top tier JIT compiler (i.e. “hosted” mode).

I think what you are aiming for is to omit printing this info when the JVMCI compiler is not used at all. This patch should achieve that:

diff -r f564ec7074f0 src/hotspot/share/jvmci/jvmciCompiler.cpp
--- a/src/hotspot/share/jvmci/jvmciCompiler.cpp Thu Jul 23 11:47:20 2020 +0200
+++ b/src/hotspot/share/jvmci/jvmciCompiler.cpp Fri Jul 24 15:18:22 2020 +0200
@@ -146,6 +146,8 @@

 // Print compilation timers and statistics
 void JVMCICompiler::print_compilation_timers() {
-  JVMCI_event_1("JVMCICompiler::print_timers");
-  tty->print_cr("       JVMCI code install time:        %6.3f s",    _codeInstallTimer.seconds());
+  if (_codeInstallTimer.seconds() != 0) {
+    JVMCI_event_1("JVMCICompiler::print_timers");
+    tty->print_cr("       JVMCI code install time:        %6.3f s",    _codeInstallTimer.seconds());
+  }
 }

-Doug

> On 24 Jul 2020, at 14:51, Schmidt, Lutz <lutz.schmidt at sap.com> wrote:
> 
> Dear all, 
> 
> may I please request reviews for this small fix? I would even say it is a trivial fix. It inverts an if condition such that JVMCI specific code is called only when JVMCI compilation is enabled via UseJVMCICompiler.
> 
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8250233
> Webrev: http://cr.openjdk.java.net/~lucy/webrevs/8250233.00/ 
> 
> Local testing looks good. jdk/submit tests pending.
> 
> Thank you!
> Lutz
> 
> 
> 



More information about the hotspot-compiler-dev mailing list