RFR: 8347734: Turning off PerfData logging doesn't work
duke
duke at openjdk.org
Thu Mar 20 10:50:16 UTC 2025
On Thu, 13 Mar 2025 15:07:07 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:
> Hi everyone,
>
> When PerfData is disabled, the corresponding perfdata variables remain uninitialized. However, under certain conditions, logging may attempt to access these variables, leading to a crash. The existing code turns off the relevant tags using `LogConfiguration::configure_stdout`, but this doesn't modify other outputs. For example, the test `runtime/logging/RedefineClasses.java` crashes with `-XX:-UsePerfData` because it uses an output that isn't stdout.
>
> To fix this, I've added a new method `LogConfiguration::disable_tags`. Unlike `configure_stdout`, this function iterates over all outputs and disables the specified tags on each. This way, we correctly disable tags across all outputs and longer try and access the uninitialized perfdata variables.
@caspernorrbin
Your change (at version ed4d479f21b763b19d538b87d157b50d3e1bc4f4) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24036#issuecomment-2739930491
More information about the hotspot-runtime-dev
mailing list