Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8273372: Remove scavenge trace message in psPromotionManager #5375

Closed
wants to merge 2 commits into from

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Sep 6, 2021

Simple change of moving ResourceMark closer to where it is actually required.

Test: tier1-6


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273372: Remove scavenge trace message in psPromotionManager

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5375/head:pull/5375
$ git checkout pull/5375

Update a local copy of the PR:
$ git checkout pull/5375
$ git pull https://git.openjdk.java.net/jdk pull/5375/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5375

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5375.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 6, 2021

👋 Welcome back ayang! 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 openjdk bot added the rfr label Sep 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 6, 2021

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

  • hotspot-gc

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-gc label Sep 6, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 6, 2021

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

I did some looking whether there are similar places to look out for, but found nothing.

Also, I would not be opposed to completely remove that trace message: while trace messages may slow down the garbage collection significantly, this message probably does so way too much to be useful for any kind of output; I understand that this message is enabled in development builds only too, but the other collectors do not have similar messages anyway. Additionally, even when debugging it helps much more to have some a bit more targeted log message; this is kind of a last resort to dump everything. At that point during debugging adding just another log message is probably not too much of a bother (as you probably have exhausted all other options and littered the code with such messages already. I "know" because I just went through that exercise with another issue in g1, and that single one message wouldn't have helped me in any significant way).

So long story short, if you want to remove that message fine with me, but it might be a good idea to consider other opinions too.

So lgtm.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 7, 2021

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

8273372: Remove scavenge trace message in psPromotionManager

Reviewed-by: tschatzl, lkorinth

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

  • 241ac89: 8273606: Zero: SPARC64 build fails with si_band type mismatch
  • 181292d: 8273801: Handle VMTYPE for "core" VM variant
  • 09ecb11: 8273806: compiler/cpuflags/TestSSE4Disabled.java should test for CPU feature explicitly
  • 99cfc16: 8273805: gc/g1/TestGCLogMessages.java test should handle non-JFR configs
  • 1c5de8b: 8273807: Zero: Drop incorrect test block from compiler/startup/NumCompilerThreadsCheck.java
  • 46af82e: 8273804: Platform.isTieredSupported should handle the no-compiler case
  • 2d13fb2: 8273803: Zero: Handle "zero" variant in CommandLineOptionTest.java
  • d4546b6: 8273526: Extend the OSContainer API pids controller with pids.current
  • 74ffe12: 8273575: memory leak in appendBootClassPath(), paths must be deallocated
  • cbffecc: 8273832: gc/shenandoah/TestJcmdHeapDump.java does not have a @requires vm.gc.shenandoah
  • ... and 141 more: https://git.openjdk.java.net/jdk/compare/23fa0dcff062803d249c863b90a00744e3477656...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 ready label Sep 7, 2021
@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Sep 7, 2021

Log tag, scavenge, only has develop_trace level logs. If they are rarely useful, they should be removed. (I used scavenge) to see locate them.)

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Sep 7, 2021

Looking at it a bit more, probably all of these gc, scavenge log messages should get the same treatment with the local ResourceMark. They will otherwise eat tons of memory as every string for every object will be newly allocated in the resource area.

That does not preclude just removing these, but my opinion stands: at the point when you need those, you'll have likely exhausted lots of other avenues already. However maybe this is just my feeling because G1 does not have these, and there you'll need to add messages always. An alternative could be to add similar messages to G1?

It would be good if somebody else could give his opinion.

Copy link
Contributor

@lkorinth lkorinth left a comment

While the change looks good, I agree with Thomas that it is better to remove the trace altogether. Also, in general it is not always better to move the ResourceMark closer to the allocation. I think you should rename the enhancement to a name that betters describe the new code, and removing the trace (and ResourceMark) is the best way forward.

@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Sep 16, 2021

Removed those trace messages as suggested, because the signal-to-noise ratio is too low in them.

@albertnetymk albertnetymk changed the title 8273372: More precise ResourceMark in ReferenceProcessor 8273372: Remove scavenge trace message in psPromotionManager Sep 16, 2021
Copy link
Contributor

@lkorinth lkorinth left a comment

Looks good to me!

Copy link
Contributor

@tschatzl tschatzl left a comment

Ship it.

@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Sep 16, 2021

Thanks for the review.

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Sep 16, 2021

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

  • 241ac89: 8273606: Zero: SPARC64 build fails with si_band type mismatch
  • 181292d: 8273801: Handle VMTYPE for "core" VM variant
  • 09ecb11: 8273806: compiler/cpuflags/TestSSE4Disabled.java should test for CPU feature explicitly
  • 99cfc16: 8273805: gc/g1/TestGCLogMessages.java test should handle non-JFR configs
  • 1c5de8b: 8273807: Zero: Drop incorrect test block from compiler/startup/NumCompilerThreadsCheck.java
  • 46af82e: 8273804: Platform.isTieredSupported should handle the no-compiler case
  • 2d13fb2: 8273803: Zero: Handle "zero" variant in CommandLineOptionTest.java
  • d4546b6: 8273526: Extend the OSContainer API pids controller with pids.current
  • 74ffe12: 8273575: memory leak in appendBootClassPath(), paths must be deallocated
  • cbffecc: 8273832: gc/shenandoah/TestJcmdHeapDump.java does not have a @requires vm.gc.shenandoah
  • ... and 141 more: https://git.openjdk.java.net/jdk/compare/23fa0dcff062803d249c863b90a00744e3477656...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 16, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 16, 2021

@albertnetymk Pushed as commit 14dc517.

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

@albertnetymk albertnetymk deleted the resource-mark branch Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated
3 participants