Skip to content

8372348: Adjust some UL / JFR string deduplication output messages#28455

Closed
MBaesken wants to merge 3 commits intoopenjdk:masterfrom
MBaesken:JDK-8372348
Closed

8372348: Adjust some UL / JFR string deduplication output messages#28455
MBaesken wants to merge 3 commits intoopenjdk:masterfrom
MBaesken:JDK-8372348

Conversation

@MBaesken
Copy link
Member

@MBaesken MBaesken commented Nov 21, 2025

There is some UL output in the string deduplication code that is not very clear and has room for improvement.
The inspected strings number should be shown and the new unknown strings get a changed text.
(also the new JFR strip dedup event description is slightly adjusted)


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-8372348: Adjust some UL / JFR string deduplication output messages (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28455

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 21, 2025

👋 Welcome back mbaesken! 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 Nov 21, 2025

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

8372348: Adjust some UL / JFR string deduplication output messages

Reviewed-by: fandreuzzi, lucy, asteiner

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

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 changed the title JDK-8372348: Adjust some UL / JFR string deduplication output messages 8372348: Adjust some UL / JFR string deduplication output messages Nov 21, 2025
@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Nov 21, 2025
@openjdk
Copy link

openjdk bot commented Nov 21, 2025

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

  • hotspot

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 rfr Pull request is ready for review label Nov 21, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 21, 2025

Webrevs

log_debug(stringdedup)(" Inspected: %12zu", _inspected);
log_debug(stringdedup)(" Known: %12zu(%5.1f%%)", _known, known_percent);
log_debug(stringdedup)(" Shared: %12zu(%5.1f%%)", _known_shared, known_shared_percent);
log_debug(stringdedup)(" New unknown: %12zu(%5.1f%%)" STRDEDUP_BYTES_FORMAT,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if just Unknown would be more self-explanatory than New unknown? We have Known already, and New unknown is the complement of Known

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe , but the variables are named _new / _new_bytes and the JFR fields also have 'new' in the name. So it maybe makes sense to keep 'new' in the UL and related output.

Copy link
Member Author

Choose a reason for hiding this comment

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

The avg (now named total avg) is for some people also a bit mysterious .
It is , taken from total_stat , the deduped bytes / new bytes . Why is it called avg? avg of what ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding total will be helpful already, but why are not the numbers printed on which the avg is based? Because otherwise you don't get an impression what the percentage mean.

Copy link
Member Author

@MBaesken MBaesken Dec 11, 2025

Choose a reason for hiding this comment

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

total avg of deduped / new unknown bytes maybe ? That mentions what is used for the computation .
We could also print the values of total deduped and new to make it more clear .

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding total will be helpful already, but why are not the numbers printed on which the avg is based? Because otherwise you don't get an impression what the percentage mean.

I added some more output, please check .

Copy link
Contributor

Choose a reason for hiding this comment

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

I would appreciate the additional output to get a better understanding of the provided total avg.

Copy link
Member Author

Choose a reason for hiding this comment

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

So are you fine with the current change ?

@MBaesken
Copy link
Member Author

Thanks for the review !

May I have a second review , please ?

last_stat->_new, STRDEDUP_BYTES_PARAM(last_stat->_new_bytes),
last_stat->_deduped, STRDEDUP_BYTES_PARAM(last_stat->_deduped_bytes),
percent_of(total_stat->_deduped_bytes, total_stat->_new_bytes),
total_stat->_deduped_bytes, total_stat->_new_bytes,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these two use STRDEDUP_BYTES_FORMAT and STRDEDUP_BYTES_PARAM?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah seems so, this is what is used for STRDEDUP_BYTES_PARAM(last_stat->_new_bytes), STRDEDUP_BYTES_PARAM(last_stat->_deduped_bytes), .

Copy link
Contributor

@RealLucy RealLucy 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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 17, 2025
@MBaesken
Copy link
Member Author

Thanks for the reviews !

/integrate

@openjdk
Copy link

openjdk bot commented Dec 18, 2025

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 18, 2025

@MBaesken Pushed as commit 3f20eb9.

💡 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 hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants