Skip to content

Conversation

@caspernorrbin
Copy link
Member

@caspernorrbin caspernorrbin commented Mar 13, 2025

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8347734: Turning off PerfData logging doesn't work (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24036/head:pull/24036
$ git checkout pull/24036

Update a local copy of the PR:
$ git checkout pull/24036
$ git pull https://git.openjdk.org/jdk.git pull/24036/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24036

View PR using the GUI difftool:
$ git pr show -t 24036

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24036.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2025

👋 Welcome back cnorrbin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 13, 2025

@caspernorrbin This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8347734: Turning off PerfData logging doesn't work

Reviewed-by: dholmes, coleenp

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 115 new commits pushed to the master branch:

  • 96305e0: 4466930: JTable.selectAll boundary handling
  • fb210e3: 8351952: [IR Framework]: allow ignoring methods that are not compilable
  • 3ed010a: 8352020: [CompileFramework] enable compilation for VectorAPI
  • a5d06a1: 8352249: Remove incidental whitespace in traditional doc comments
  • 74df384: 8352428: GenShen: Old-gen cycles are still looping
  • fcc2a24: 8350813: Rendering of bulky sound bank from MIDI sequence can cause OutOfMemoryError
  • ac3ad03: 8350589: Investigate cleaner implementation of AArch64 ML-DSA intrinsic introduced in JDK-8348561
  • 8a1c85e: 8350898: Shenandoah: Eliminate final roots safepoint
  • 8e999b8: 8351969: Add Public Identifiers to the JDK built-in Catalog
  • c7f3338: 8352109: java/awt/Desktop/MailTest.java fails in platforms where Action.MAIL is not supported
  • ... and 105 more: https://git.openjdk.org/jdk/compare/cd9f1d3d921531511a7552807d099d5d3cce01a6...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dholmes-ora, @coleenp) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title 8347734 8347734: Turning off PerfData logging doesn't work Mar 13, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 13, 2025
@openjdk
Copy link

openjdk bot commented Mar 13, 2025

@caspernorrbin The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Mar 13, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2025

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks for fixing it Casper!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 17, 2025
Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thank you for fixing it.

@caspernorrbin
Copy link
Member Author

Thank you for the reviews!

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 20, 2025
@openjdk
Copy link

openjdk bot commented Mar 20, 2025

@caspernorrbin
Your change (at version ed4d479) is now ready to be sponsored by a Committer.

@dholmes-ora
Copy link
Member

/sponsor

@caspernorrbin please ensure to check the progress of your fix in the CI once it is integrated.

@openjdk
Copy link

openjdk bot commented Mar 20, 2025

Going to push as commit 73177d9.
Since your change was applied there have been 115 commits pushed to the master branch:

  • 96305e0: 4466930: JTable.selectAll boundary handling
  • fb210e3: 8351952: [IR Framework]: allow ignoring methods that are not compilable
  • 3ed010a: 8352020: [CompileFramework] enable compilation for VectorAPI
  • a5d06a1: 8352249: Remove incidental whitespace in traditional doc comments
  • 74df384: 8352428: GenShen: Old-gen cycles are still looping
  • fcc2a24: 8350813: Rendering of bulky sound bank from MIDI sequence can cause OutOfMemoryError
  • ac3ad03: 8350589: Investigate cleaner implementation of AArch64 ML-DSA intrinsic introduced in JDK-8348561
  • 8a1c85e: 8350898: Shenandoah: Eliminate final roots safepoint
  • 8e999b8: 8351969: Add Public Identifiers to the JDK built-in Catalog
  • c7f3338: 8352109: java/awt/Desktop/MailTest.java fails in platforms where Action.MAIL is not supported
  • ... and 105 more: https://git.openjdk.org/jdk/compare/cd9f1d3d921531511a7552807d099d5d3cce01a6...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 20, 2025
@openjdk openjdk bot closed this Mar 20, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 20, 2025
@openjdk
Copy link

openjdk bot commented Mar 20, 2025

@dholmes-ora @caspernorrbin Pushed as commit 73177d9.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@caspernorrbin caspernorrbin deleted the perfdata-logging-fix branch September 10, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants