Skip to content

Conversation

@sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Feb 25, 2025

Hi all,

Seen discussion in #23290 (comment). The LOG_PLEASE macro seems currently being defined are debugging leftovers that shouldn't have been committed. It's definition is typically
commented or uncommented to provide some additional logging for some tests of interest.

This PR comment out the #define LOG_PLEASE same to other gtests. Change has been verified locally, test-fix only, no risk.


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-8350584: Check the usage of LOG_PLEASE (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23764

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 25, 2025

👋 Welcome back syan! 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 Feb 25, 2025

@sendaoYan 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:

8350584: Check the usage of LOG_PLEASE

Reviewed-by: stuefe

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 82 new commits pushed to the master branch:

  • 717c499: 8351014: ProblemList the com/sun/management/OperatingSystemMXBean cpuLoad tests on Windows
  • 3657e92: 8349637: Integer.numberOfLeadingZeros outputs incorrectly in certain cases
  • 93c8784: 8350716: [s390] intrinsify Thread.currentThread()
  • d48ddfe: 8350748: VectorAPI: Method "checkMaskFromIndexSize" should be force inlined
  • 0a1eea1: 8345492: Fix -Wzero-as-null-pointer-constant warnings in adlc code
  • 157e5ad: 8350916: Remove misleading warning "Cannot dump shared archive while using shared archive"
  • 785e7b4: 8350819: Ignore core files
  • 3c72c04: 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default
  • 6b719ee: 8348596: Update FreeType to 2.13.3
  • a87dd1a: 8347139: [macos] Test tools/jpackage/share/InOutPathTest.java failed: "execution error: Finder got an error: AppleEvent timed out."
  • ... and 72 more: https://git.openjdk.org/jdk/compare/990d40e98da2ceb3261096eaa55550565af58fc1...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 25, 2025
@openjdk
Copy link

openjdk bot commented Feb 25, 2025

@sendaoYan 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 Feb 25, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 25, 2025

Webrevs

@dholmes-ora
Copy link
Member

Having debug logging enabled in some tests is not necessarily an issue that needs to be "fixed". You need to ask the person who enabled it why they did so.

If it is enabled in some tests then we do need to guard against redefinition incase it is globally enabled (and there is nothing wrong with that either).

@sendaoYan sendaoYan closed this Feb 25, 2025
@sendaoYan sendaoYan deleted the jbs8350584 branch February 25, 2025 06:54
@dholmes-ora
Copy link
Member

I don't understand how the redefinition error could be resolved. ??

@sendaoYan sendaoYan restored the jbs8350584 branch February 25, 2025 10:16
@sendaoYan
Copy link
Member Author

I don't understand how the redefinition error could be resolved. ??

Sorry, I forgot pass --with-gtest=/home/yansendao/git/googletest-v1.14.x argument when execute configure command. Without --with-gtest argument make will success with extra CXXFLAGS/CFLAGS=-DLOG_PLEASE.

@sendaoYan sendaoYan reopened this Feb 25, 2025
@sendaoYan
Copy link
Member Author

Having debug logging enabled in some tests is not necessarily an issue that needs to be "fixed". You need to ask the person who enabled it why they did so.

If it is enabled in some tests then we do need to guard against redefinition incase it is globally enabled (and there is nothing wrong with that either).

@tstuefe @rkennke Hi, Does the #define LOG_PLEASE in gtests is necessary actually, should we comment out the #define LOG_PLEASE, because it will cause make report redefinition error when configure with arguments --with-extra-cflags=-DLOG_PLEASE --with-extra-cxxflags=-DLOG_PLEASE

@tstuefe
Copy link
Member

tstuefe commented Mar 3, 2025

Having debug logging enabled in some tests is not necessarily an issue that needs to be "fixed". You need to ask the person who enabled it why they did so.

If it is enabled in some tests then we do need to guard against redefinition incase it is globally enabled (and there is nothing wrong with that either).

That.

Yes, these are mine. I tend to introduce them when I think I may have to look at a failing gtest again, possibly on some weird platform. If people are bothered by it, we can remove the output, but I think they are still slightly useful in their current form. I never actually thought people would globally define the log.

Using UL logging may not work as intended since UL may not be available in some gtests.

While debug output is not bad, it's better to disable it by default, since we need to take care that the output does not overflow and get truncated by the jtreg runner.

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

This is fine.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 3, 2025
@sendaoYan
Copy link
Member Author

Thanks all for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Mar 3, 2025

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

  • 717c499: 8351014: ProblemList the com/sun/management/OperatingSystemMXBean cpuLoad tests on Windows
  • 3657e92: 8349637: Integer.numberOfLeadingZeros outputs incorrectly in certain cases
  • 93c8784: 8350716: [s390] intrinsify Thread.currentThread()
  • d48ddfe: 8350748: VectorAPI: Method "checkMaskFromIndexSize" should be force inlined
  • 0a1eea1: 8345492: Fix -Wzero-as-null-pointer-constant warnings in adlc code
  • 157e5ad: 8350916: Remove misleading warning "Cannot dump shared archive while using shared archive"
  • 785e7b4: 8350819: Ignore core files
  • 3c72c04: 8350818: Improve OperatingSystemMXBean cpu load tests to not accept -1.0 by default
  • 6b719ee: 8348596: Update FreeType to 2.13.3
  • a87dd1a: 8347139: [macos] Test tools/jpackage/share/InOutPathTest.java failed: "execution error: Finder got an error: AppleEvent timed out."
  • ... and 72 more: https://git.openjdk.org/jdk/compare/990d40e98da2ceb3261096eaa55550565af58fc1...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 3, 2025
@openjdk openjdk bot closed this Mar 3, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Mar 3, 2025
@sendaoYan sendaoYan deleted the jbs8350584 branch March 3, 2025 07:48
@openjdk openjdk bot removed the rfr Pull request is ready for review label Mar 3, 2025
@openjdk
Copy link

openjdk bot commented Mar 3, 2025

@sendaoYan Pushed as commit b054d24.

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

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