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

8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718 #18264

Closed
wants to merge 3 commits into from

Conversation

RealCLanger
Copy link
Contributor

@RealCLanger RealCLanger commented Mar 13, 2024

4f33608 (JDK-8326718) added a few cases to test java/util/Formatter/Padding.java with huge Strings as arguments. Since all possible argument combinations for the test are stored in one array, nothing can be garbage collected while the test is running and the heap requirement is blown up.

In one of our test pipelines we run tier1 tests with VMs that default to 384M of heap and this is not sufficient any longer.

I'm improving this by splitting the one large @ParameterizedTest into multiple ones. With that, I could run the test successfully in a test VM with 96M of heap, e.g. by modifying @run junit Padding to @run junit/othervm -Xmx96m Padding


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-8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718 (Enhancement - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18264

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2024

👋 Welcome back clanger! 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 Pull request is ready for review label Mar 13, 2024
@openjdk
Copy link

openjdk bot commented Mar 13, 2024

@RealCLanger The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Mar 13, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2024

Webrevs

@rgiulietti
Copy link
Contributor

What about factoring out the 4 invocations of tenMillionBlanks() in each source method in a local var?

@rgiulietti
Copy link
Contributor

L.26-27 to

 * @bug 4906370 8299677 8326718 8328037
 * @summary Tests to exercise padding on int and double values,

@RealCLanger
Copy link
Contributor Author

What about factoring out the 4 invocations of tenMillionBlanks() in each source method in a local var?

OK, I inlined the generation of the ten million character strings into the parameter generator methods. I looked a bit at the test runtime and it seems like it doesn't make a lot of difference in a test JVM with larger heap but for smaller test VMs it seems to improve things.

@rgiulietti
Copy link
Contributor

I was thinking more something like

        var tenMillionBlanks = tenMillionBlanks();

and similarly for tenMillionsZeros, thus maintaining the private static (but not final ;-) ) methods as in your previous commit.
But if you are happy with the last commit, it's OK as well.

Can you please add the bug id to @bug and correct the typo, as suggested here?

Otherwise looks fine.

@openjdk
Copy link

openjdk bot commented Mar 13, 2024

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

8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718

Reviewed-by: rgiulietti

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

  • 1281e18: 8325613: CTW: Stale method cleanup requires GC after Sweeper removal
  • 49ce85f: 8327874: Convert javax/swing/JTree/4314199/bug4314199.java applet test to main
  • 481c866: 8327468: Do not restart close if errno is EINTR [macOS/linux]
  • 44aef38: 8327045: Consolidate -fvisibility=hidden as a basic flag for all compilation
  • fcf746d: 8328106: COMPARE_BUILD improvements
  • fadc4b1: 8327423: C2 remove_main_post_loops: check if main-loop belongs to pre-loop, not just assert
  • cff0747: 8326204: yield statements doesn't allow cast expressions with more than 1 type arguments
  • 6f2676d: 8328064: Remove obsolete comments in constantPool and metadataFactory
  • 7502dc9: 8328030: Convert javax/swing/text/GlyphView/4984669/bug4984669.java applet test to main
  • 357c912: 8325897: Parallel: Remove PSYoungGen::is_maximal_no_gc
  • ... and 24 more: https://git.openjdk.org/jdk/compare/3b18c5dc5d5885fe5ebaabd9cd74f033a584e4ae...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.

@RealCLanger
Copy link
Contributor Author

Can you please add the bug id to @bug and correct the typo, as suggested here?

Done.

I kept the tenMillion... handling.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 14, 2024
@RealCLanger
Copy link
Contributor Author

Thanks, @rgiulietti for reviewing this.

/integrate

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

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

  • 06f4b7f: 8327756: Convert javax/swing/JSlider/4987336/bug4987336.java applet to main
  • 605800e: 8203867: Delete test java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html
  • 0943937: 8328218: Delete test java/awt/Window/FindOwner/FindOwner.html
  • f6390e5: 8328089: Automate javax/swing/JTable/4222153/bug4222153.java applet test
  • e8d1ba3: 8328228: Missing comma in copyright year for a few JColorChooser tests
  • be1dd27: 8328130: Remove applet usage from JColorChooser tests Test4759934
  • fab0edc: 8328121: Remove applet usage from JColorChooser tests Test4759306
  • 7c6fd33: 8327857: Remove applet usage from JColorChooser tests Test4222508
  • 89fb0f8: 8327859: Remove applet usage from JColorChooser tests Test4319113
  • df909e2: 8328011: Convert java/awt/Frame/GetBoundsResizeTest/GetBoundsResizeTest.java applet test to main
  • ... and 55 more: https://git.openjdk.org/jdk/compare/3b18c5dc5d5885fe5ebaabd9cd74f033a584e4ae...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 15, 2024

@RealCLanger Pushed as commit 128e60a.

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

@RealCLanger RealCLanger deleted the JDK-8328037 branch March 15, 2024 06:42
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.

2 participants