Skip to content

8349200: [JMH] time.format.ZonedDateTimeFormatterBenchmark fails #23414

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

Closed
wants to merge 2 commits into from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Feb 3, 2025

Hi all,
The JMH test "org.openjdk.bench.java.time.format.ZonedDateTimeFormatterBenchmark.parse" fails "java.time.format.DateTimeParseException: Text '2015:03:10:12:13:ECT' could not be parsed at index 17".
The ECT standard for "America/Guayaquil" - "Ecuador Time", and since jdk23 the ECT TimeZone.SHORT doesn't support anymore. Below code snippet shows the difference between jdk22 and jdk23:

        TimeZone tz = TimeZone.getTimeZone("America/Guayaquil");
        System.out.println(tz.getDisplayName());
        System.out.println(tz.getDisplayName(true, TimeZone.SHORT));
        System.out.println(tz.getDisplayName(false, TimeZone.SHORT));
  • Java 22 output:
~/software/jdk/temurin/jdk-22.0.2+9/bin/java ~/compiler-test/zzkk/TimeZoneTest.java 
Ecuador Time
ECST
ECT
  • Java 23 output:
~/software/jdk/temurin/jdk-23+37/bin/java ~/compiler-test/zzkk/TimeZoneTest.java 
Ecuador Time
GMT-04:00
GMT-05:00

This PR use Z TimeZone.SHORT instead of ECT will make this test more generic. 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-8349200: [JMH] time.format.ZonedDateTimeFormatterBenchmark fails (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23414

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 3, 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 3, 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:

8349200: [JMH] time.format.ZonedDateTimeFormatterBenchmark fails

Reviewed-by: naoto, jlu

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

  • bad39b6: 8348610: GenShen: TestShenandoahEvacuationInformationEvent failed with setRegions >= regionsFreed: expected 1 >= 57
  • 250ff86: 8349000: Performance improvement for Currency.isPastCutoverDate(String)
  • ee4caa4: 8349106: Change ChaCha20 intrinsic to use quarter-round parallel implementation on aarch64
  • b985347: 8348349: Refactor CDSConfig::is_dumping_heap()
  • beb43e2: 8349343: Add missing copyright messages in FFM benchmarks
  • e91a6ec: 8347489: RISC-V: Misaligned memory access with COH
  • d699aba: 8349135: Add tests for HttpRequest.Builder.copy()
  • 81126c2: 8349238: Some more FFM benchmarks are broken
  • beae884: 8349150: Support precompiled headers on AIX
  • c545a3e: 8346774: Use Predicate classes instead of Node classes
  • ... and 10 more: https://git.openjdk.org/jdk/compare/2cce5eeb092b68b4e4ce6a8289a8aa567f47c973...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 3, 2025
@openjdk
Copy link

openjdk bot commented Feb 3, 2025

@sendaoYan To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • build
  • client
  • compiler
  • core-libs
  • graal
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • ide-support
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah

@sendaoYan
Copy link
Member Author

/label add core-libs

@sendaoYan
Copy link
Member Author

/label add i18n

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Feb 3, 2025
@openjdk
Copy link

openjdk bot commented Feb 3, 2025

@sendaoYan
The core-libs label was successfully added.

@openjdk openjdk bot added the i18n i18n-dev@openjdk.org label Feb 3, 2025
@openjdk
Copy link

openjdk bot commented Feb 3, 2025

@sendaoYan
The i18n label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Feb 3, 2025

Webrevs

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a comment

Choose a reason for hiding this comment

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

Switch to universal time for the time-zone to generalize the benchmark looks good to me.

@naotoj
Copy link
Member

naotoj commented Feb 3, 2025

The benchmark was provided with the fix to https://bugs.openjdk.org/browse/JDK-8304976, and most likely the failure was due to the removal of COMPAT locale provider. Would you double check the benchmark is relevant with your fix? Since UTC is a special time zone, so I just wanted to double check. If we need more practical short name, "PST" might not be a bad choice

@sendaoYan
Copy link
Member Author

sendaoYan commented Feb 4, 2025

most likely the failure was due to the removal of COMPAT locale provide

Yes. git bisect result shows that the failure was due to PR "8174269: Remove COMPAT locale data provider from JDK"

And, use jdk22, the difference between '-Djava.locale.providers=COMPAT' and '-Djava.locale.providers=CLDR' also convinced that.

~/software/jdk/temurin/jdk-22.0.2+9/bin/java -Djava.locale.providers=COMPAT ~/compiler-test/zzkk/TimeZoneTest.java 
Feb 04, 2025 10:19:51 AM sun.util.locale.provider.LocaleProviderAdapter <clinit>
WARNING: COMPAT locale provider will be removed in a future release
Ecuador Time
ECST
ECT
~/software/jdk/temurin/jdk-22.0.2+9/bin/java -Djava.locale.providers=CLDR ~/compiler-test/zzkk/TimeZoneTest.java 
Ecuador Time
GMT-05:00
GMT-05:00

@sendaoYan
Copy link
Member Author

If we need more practical short name, "PST" might not be a bad choice.

I think use "Pacific Standard Time - PST" is a more practical chioce. The PR has been updated.

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the update

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

Thanks all for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Feb 5, 2025

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

  • 9d23de5: 8184352: Remove Sun provider information from KeyPairGenerator javadoc
  • d222c18: 8349107: Remove RMI finalizers
  • bad39b6: 8348610: GenShen: TestShenandoahEvacuationInformationEvent failed with setRegions >= regionsFreed: expected 1 >= 57
  • 250ff86: 8349000: Performance improvement for Currency.isPastCutoverDate(String)
  • ee4caa4: 8349106: Change ChaCha20 intrinsic to use quarter-round parallel implementation on aarch64
  • b985347: 8348349: Refactor CDSConfig::is_dumping_heap()
  • beb43e2: 8349343: Add missing copyright messages in FFM benchmarks
  • e91a6ec: 8347489: RISC-V: Misaligned memory access with COH
  • d699aba: 8349135: Add tests for HttpRequest.Builder.copy()
  • 81126c2: 8349238: Some more FFM benchmarks are broken
  • ... and 12 more: https://git.openjdk.org/jdk/compare/2cce5eeb092b68b4e4ce6a8289a8aa567f47c973...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 5, 2025

@sendaoYan Pushed as commit a51e669.

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

Successfully merging this pull request may close these issues.

3 participants