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

David Holmes dholmes at openjdk.org
Thu Aug 28 13:06:45 UTC 2025


On Thu, 28 Aug 2025 08:22:05 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

> The original issue was [JDK-8244190](https://bugs.openjdk.org/browse/JDK-8244190), this PR just fixes a short-coming of the implementation. 

Okay in the original JBS issue I wrote:

> How about you mark the output for jfr+startup info logging and have StartFlightRecording enable that logging level if not explicitly disabled? That way the output is the same, no other output is affected and the user can still turn it off if needed. I'm just not sure we have a way to query if the logging level has been explicitly set to a given value. 

But what got implemented was not what I had in mind - nor, I think,  is the adjustment you propose here. What I intended was along the lines of:

log_info(jfr, startup)("The startup message");

and then in the logic that starts JFR something like:

if (!log_is_enabled_on_stdout(info, jfr startup)
  Log::Configuration( /* enable jfr+startup on stdout */)

Though checking if it is enabled on stdout may be the tricky part. This was recognised in the original PR:

> I have chosen to implement 5. It's not perfect, but perhaps sufficient for now? 

but you also have to allow for it being turned off explicitly by the user.

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

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


More information about the hotspot-runtime-dev mailing list