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

8340416: Remove ArchiveBuilder::estimate_archive_size() #21931

Closed
wants to merge 4 commits into from

Conversation

SoniaZaldana
Copy link
Member

@SoniaZaldana SoniaZaldana commented Nov 6, 2024

Hi folks,

This PR removes ArchiveBuilder::estimate_archive_size() per the issues raised in JDK-8340416.

Thanks!
Sonia


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8340416: Remove ArchiveBuilder::estimate_archive_size() (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21931

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 6, 2024

👋 Welcome back szaldana! 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 6, 2024

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

8340416: Remove ArchiveBuilder::estimate_archive_size()

Reviewed-by: iklam, ccheung

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

  • be1cdd9: 8344140: Refactor the discovery of AOT cache artifacts
  • 973c630: 8342466: Improve API documentation for java.lang.classfile.attribute
  • 9782bfd: 8347620: Shenandoah: Use 'free' tag for free set related logging
  • 35be4a4: 8347173: java/net/DatagramSocket/InterruptibleDatagramSocket.java fails with virtual thread factory
  • 36b7abd: 8225763: Inflater and Deflater should implement AutoCloseable
  • d6d45c6: 8303884: jlink --add-options plugin does not allow GNU style options to be provided
  • 0ee6ba9: 8347596: Update HSS/LMS public key encoding
  • ec2aaaa: 8326236: assert(ce != nullptr) failed in Continuation::continuation_bottom_sender
  • 02d2493: 8347613: Remove leftover doPrivileged call in Currency test: CheckDataVersion.java
  • 10d08db: 8346142: [perf] scalability issue for the specjvm2008::xml.validation workload
  • ... and 33 more: https://git.openjdk.org/jdk/compare/a7915bb2e1b822b6d9cbeb220765e8c821c71d0b...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
Copy link

openjdk bot commented Nov 6, 2024

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Nov 6, 2024
@SoniaZaldana SoniaZaldana marked this pull request as ready for review November 6, 2024 20:46
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 6, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 6, 2024

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 4, 2024

@SoniaZaldana This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@openjdk
Copy link

openjdk bot commented Dec 5, 2024

@SoniaZaldana this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8340416
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Dec 5, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 1, 2025

@SoniaZaldana This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Jan 1, 2025
address ArchiveBuilder::reserve_buffer() {
size_t buffer_size = estimate_archive_size();
size_t buffer_size = CompressedClassSpaceSize;
Copy link
Member

Choose a reason for hiding this comment

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

CompressedClassSpaceSize is 1G by default. On 32-bit platforms, it may be difficult to reserve that much space. I think we should do this:

size_t buffer_size = LP64_ONLY() NOT_LP64(256 * M);

The 256M size is close to how much we were reserving on 32-bit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @iklam ! I made the changes.

@SoniaZaldana
Copy link
Member Author

/open

@openjdk openjdk bot reopened this Jan 13, 2025
@openjdk
Copy link

openjdk bot commented Jan 13, 2025

@SoniaZaldana This pull request is now open

@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Jan 13, 2025
@iklam
Copy link
Member

iklam commented Jan 13, 2025

Please remove these members from ArchiveBuilder as well.

  // Conservative estimate for number of bytes needed for:
  size_t _estimated_metaspaceobj_bytes;   // all archived MetaspaceObj's.
  size_t _estimated_hashtable_bytes;     // symbol table and dictionaries
  ...
  void verify_estimate_size(size_t estimate, const char* which);

@SoniaZaldana
Copy link
Member Author

Hi @iklam

Please remove these members from ArchiveBuilder as well.

  // Conservative estimate for number of bytes needed for:
  size_t _estimated_metaspaceobj_bytes;   // all archived MetaspaceObj's.
  size_t _estimated_hashtable_bytes;     // symbol table and dictionaries
  ...
  void verify_estimate_size(size_t estimate, const char* which);

Thanks for the pointer! I took a closer look at ArchiveBuilder::verify_estimate_size and I think we can delete a few other members.

address _last_verified_top;
size_t _other_region_used_bytes;

They appear to only be set in preparation for verify_estimate_size.

Thanks!

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

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

Looks good to me. I ran tiers 1-4 and builds-tier5 on our CI and all tests passed.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 15, 2025
@iklam
Copy link
Member

iklam commented Jan 15, 2025

/reviewers 2

@openjdk
Copy link

openjdk bot commented Jan 15, 2025

@iklam
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jan 15, 2025
Copy link
Member

@calvinccheung calvinccheung left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 15, 2025
@SoniaZaldana
Copy link
Member Author

/integrate

@SoniaZaldana
Copy link
Member Author

Thank you for the reviews! @calvinccheung @iklam

@openjdk
Copy link

openjdk bot commented Jan 15, 2025

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

  • 8193ba3: 8347562: javac crash due to type vars in permits clause
  • 7df21a8: 8347597: HttpClient: improve exception reporting when closing connection
  • b0e2be6: 8347729: Replace SIZE_FORMAT in parallel and serial gc
  • d4e5ec2: 8346610: Make all imports consistent in the FFM API
  • c36200b: 8347721: Replace SIZE_FORMAT in compiler directories
  • af3f5d8: 8347039: ThreadPerTaskExecutor terminates if cancelled tasks still running
  • 91197b3: 8347531: The signal tests are failing after JDK-8345782 due to an unrelated warning
  • 4f3dc9d: 8347352: RISC-V: Cleanup bitwise AND assembler routines
  • afc4529: 8346834: Tests failing with -XX:+UseNUMA due to "NUMA support disabled" warning
  • a3be97e: 8347761: Test tools/jimage/JImageExtractTest.java fails after JDK-8303884
  • ... and 44 more: https://git.openjdk.org/jdk/compare/a7915bb2e1b822b6d9cbeb220765e8c821c71d0b...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 15, 2025

@SoniaZaldana Pushed as commit 254e840.

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

Successfully merging this pull request may close these issues.

3 participants