Skip to content

8351593: [JMH] test PhoneCode.Bulk reports NPE exception#24011

Closed
IvaVladimir wants to merge 3 commits intoopenjdk:masterfrom
IvaVladimir:JDK-8351593
Closed

8351593: [JMH] test PhoneCode.Bulk reports NPE exception#24011
IvaVladimir wants to merge 3 commits intoopenjdk:masterfrom
IvaVladimir:JDK-8351593

Conversation

@IvaVladimir
Copy link
Copy Markdown

@IvaVladimir IvaVladimir commented Mar 12, 2025

Tests that use data from the file 'cmudict-0.7b.txt' was deleted. Currently these tests using empty data set that looks bad.


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-8351593: [JMH] test PhoneCode.Bulk reports NPE exception (Enhancement - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24011

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 12, 2025

👋 Welcome back vaivanov! 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
Copy Markdown

openjdk bot commented Mar 12, 2025

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

8351593: [JMH] test PhoneCode.Bulk reports NPE exception

Reviewed-by: redestad, drwhite

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

  • 79824c3: 8352184: Jtreg tests using CommandLineOptionTest.getVMTypeOption() and optionsvalidation.JVMOptionsUtils fail on static JDK
  • c50a0a1: 8352508: [Redo] G1: Pinned regions with pinned objects only reachable by native code crash VM
  • 89e5c42: 8294954: Remove superfluous ResourceMarks when using LogStream
  • 41f3eea: 8352624: Add missing {@code} to PassFailJFrame.Builder.splitUI
  • e2cd70a: 8351151: Clean up x86 template interpreter after 32-bit x86 removal
  • b990780: 8352393: AIX: Problem list serviceability/attach/AttachAPIv2/StreamingOutputTest.java
  • 927aeb2: 8352617: IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself
  • 0bfa636: 8352426: RelocIterator should correctly handle nullptr address of relocation data
  • b7ffd22: 8352980: Purge infrastructure for FP-to-bits interpreter intrinsics after 32-bit x86 removal
  • 9a87e21: 8352800: [PPC] OpenJDK fails to build on PPC after JDK-8350106
  • ... and 213 more: https://git.openjdk.org/jdk/compare/da2b4f0749dffc99fa42c7311fbc74231af273bd...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 (@cl4es, @dwhite-intel) 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 JDK-8351593 [JMH] test PhoneCode.Bulk reports NPE exception 8351593: [JMH] test PhoneCode.Bulk reports NPE exception Mar 12, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 12, 2025
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2025

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Mar 12, 2025
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 12, 2025

Webrevs

@cl4es
Copy link
Copy Markdown
Member

cl4es commented Mar 20, 2025

The root cause seems to be that DataProviders.dictionary() attempts to load a dictionary file that isn't there, which means that the microbenchmark is likely not testing what the original author intended. This was missed when porting over from jmh-jdk-microbenchmarks. See https://github.com/openjdk/jmh-jdk-microbenchmarks/blob/master/micros-jdk8/src/main/resources/org/openjdk/bench/java/util/stream/tasks/cmudict-0.7b.txt

I'd suggest removing DataProviders and the tests which depend on it.

@IvaVladimir
Copy link
Copy Markdown
Author

Is it make sense to restore the 'cmudict-0.7b.txt' from the old 'https://hg.openjdk.java.net/code-tools/jmh-jdk-microbenchmarks'?

@cl4es
Copy link
Copy Markdown
Member

cl4es commented Mar 20, 2025

I would argue against that.

While tests and test resources already comprise ~360M it could be argued that adding this 3.5M dictionary file wouldn't hurt all that much -- but OTOH this benchmark was ported over in a bulk fashion and obviously hasn't done what it's supposed to be doing ever since. I lean towards removing defunct and otherwise questionable microbenchmarks from the inlined JMH suite.

Copy link
Copy Markdown
Member

@cl4es cl4es left a comment

Choose a reason for hiding this comment

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

Thanks for this update which removes all benchmarks that rely on the absent cmudict-0.7b.txt dictionary. I think removing is less controversial than fixing in this case for a cleanup/bug fix PR.

Fixed variants of these micros might be good to consider for a follow-up enhancement, with backing evidence that they are useful enough to motivate the extra luggage.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 24, 2025
@IvaVladimir
Copy link
Copy Markdown
Author

/integrate

Thanks for your review!

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

openjdk bot commented Mar 24, 2025

@IvaVladimir
Your change (at version 772de50) is now ready to be sponsored by a Committer.

Copy link
Copy Markdown

@dwhite-intel dwhite-intel left a comment

Choose a reason for hiding this comment

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

Should /DictionaryWordValue/Xtras.java be deleted also?

@openjdk openjdk bot removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated labels Mar 24, 2025
@IvaVladimir
Copy link
Copy Markdown
Author

yes, you are correct. Nobody else use the Xtras.java and it should be deleted.

Copy link
Copy Markdown

@dwhite-intel dwhite-intel left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 27, 2025
@IvaVladimir
Copy link
Copy Markdown
Author

/integrate

Thanks for your review!

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

openjdk bot commented Mar 27, 2025

@IvaVladimir
Your change (at version 7cc9932) is now ready to be sponsored by a Committer.

@dwhite-intel
Copy link
Copy Markdown

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 27, 2025

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

  • 79824c3: 8352184: Jtreg tests using CommandLineOptionTest.getVMTypeOption() and optionsvalidation.JVMOptionsUtils fail on static JDK
  • c50a0a1: 8352508: [Redo] G1: Pinned regions with pinned objects only reachable by native code crash VM
  • 89e5c42: 8294954: Remove superfluous ResourceMarks when using LogStream
  • 41f3eea: 8352624: Add missing {@code} to PassFailJFrame.Builder.splitUI
  • e2cd70a: 8351151: Clean up x86 template interpreter after 32-bit x86 removal
  • b990780: 8352393: AIX: Problem list serviceability/attach/AttachAPIv2/StreamingOutputTest.java
  • 927aeb2: 8352617: IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself
  • 0bfa636: 8352426: RelocIterator should correctly handle nullptr address of relocation data
  • b7ffd22: 8352980: Purge infrastructure for FP-to-bits interpreter intrinsics after 32-bit x86 removal
  • 9a87e21: 8352800: [PPC] OpenJDK fails to build on PPC after JDK-8350106
  • ... and 213 more: https://git.openjdk.org/jdk/compare/da2b4f0749dffc99fa42c7311fbc74231af273bd...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 27, 2025
@openjdk openjdk bot closed this Mar 27, 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 27, 2025
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 27, 2025

@dwhite-intel @IvaVladimir Pushed as commit 50ac24e.

💡 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

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants