RFR: 8366232: JFR startup messages are shown with -Xlog:jfr+startup=warning

Johannes Bechberger jbechberger at openjdk.org
Thu Aug 28 08:24:41 UTC 2025


On Wed, 27 Aug 2025 12:07:54 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

> Only print the JFR startup messages when no or a < warning log level is set explicitly by the user.

The original issue was [JDK-8244190](https://bugs.openjdk.org/browse/JDK-8244190), this PR just fixes a short-coming of the implementation. The limitations is even mentioned in [one of the tests](https://github.com/openjdk/jdk/blob/master/test/jdk/jdk/jfr/startupargs/TestStartupMessage.java):


        startJfrJvm("-Xlog:jfr+startup=error")
             .shouldNotContain("[jfr,startup")
             .shouldNotContain("Started recording")
             .shouldNotContain("Use jcmd");

         // Known limitation.
         // Can't turn off log with -Xlog:jfr+startup=warning

         startJfrJvm()
             .shouldContain("[info][jfr,startup")
             .shouldContain("Started recording")
             .shouldContain("Use jcmd");


This PR updates the test too.

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

PR Comment: https://git.openjdk.org/jdk/pull/26957#issuecomment-3232456905


More information about the hotspot-runtime-dev mailing list