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

8270803: Reduce CDS API verbosity #4834

Closed
wants to merge 4 commits into from

Conversation

iklam
Copy link
Member

@iklam iklam commented Jul 20, 2021

The CDS APIs have some excessively long function/field/enum names. E.g.,

HeapShared::set_closed_archive_heap_region_mapped()
HeapShared::fixup_mapped_heap_regions() 
MetaspaceShared::first_closed_archive_heap_region 
FileMapInfo::write_archive_heap_regions()

Words such as archive_heap_, archive_, heap_, ... can be removed when the context is clear:

HeapShared::set_closed_regions_mapped()
HeapShared::fixup_mapped_regions() 
MetaspaceShared::first_closed_heap_region 
FileMapInfo::write_heap_regions()

This RFE also fixes inconsistency and grammatical errors in the code:

  • The code uses different names like GrowableArray<MemRegion>* {archive, mem, range} to refer to the same thing. Change these to GrowableArray<MemRegion>* regions
  • Change the word region to regions when appropriate
  • Remove unused field HeapShared::_archive_heap_region_fixed

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4834/head:pull/4834
$ git checkout pull/4834

Update a local copy of the PR:
$ git checkout pull/4834
$ git pull https://git.openjdk.java.net/jdk pull/4834/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4834

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4834.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 20, 2021

👋 Welcome back iklam! 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 openjdk bot commented Jul 20, 2021

@iklam 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 hotspot label Jul 20, 2021
@iklam
Copy link
Member Author

@iklam iklam commented Jul 20, 2021

/label remove hotspot
/label add hotspot-runtime

@openjdk openjdk bot removed the hotspot label Jul 20, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 20, 2021

@iklam
The hotspot label was successfully removed.

@openjdk
Copy link

@openjdk openjdk bot commented Jul 20, 2021

@iklam
The hotspot-runtime label was successfully added.

@openjdk openjdk bot added the hotspot-runtime label Jul 20, 2021
@iklam iklam marked this pull request as ready for review Jul 20, 2021
@openjdk openjdk bot added the rfr label Jul 20, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 20, 2021

Webrevs

@iklam iklam force-pushed the 8270803-reduce-cds-api-verbosity branch from 83e878c to 833bb42 Compare Jul 20, 2021
yminqi
yminqi approved these changes Jul 20, 2021
Copy link
Contributor

@yminqi yminqi left a comment

LGTM. tiny nits.

MetaspaceShared::max_closed_archive_heap_region,
&num_closed_archive_heap_ranges)) {
HeapShared::set_closed_archive_heap_region_mapped();
// Map the closed_heap regions, GC does not write into the regions.
Copy link
Contributor

@yminqi yminqi Jul 20, 2021

Choose a reason for hiding this comment

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

either add '' between heap and regions or replace the "' with space.

Copy link
Member Author

@iklam iklam Jul 20, 2021

Choose a reason for hiding this comment

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

I changed to // Map the closed heap regions: GC does not write into these regions. I also updated the comment for the open heap regions a few lines below.

@openjdk
Copy link

@openjdk openjdk bot commented Jul 20, 2021

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

8270803: Reduce CDS API verbosity

Reviewed-by: minqi, 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 1 new commit pushed to the master branch:

  • 6346793: 8269933: test/jdk/javax/net/ssl/compatibility/JdkInfo incorrect verification of protocol and cipher support

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 added the ready label Jul 20, 2021
*heap_mem = regions;
*num = region_num;
*regions_ret = regions;
*num_ret = region_num;
Copy link
Member

@calvinccheung calvinccheung Jul 20, 2021

Choose a reason for hiding this comment

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

Instead of num_ret, I think num_regions is easier to understand.

Copy link
Member Author

@iklam iklam Jul 20, 2021

Choose a reason for hiding this comment

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

I renamed it to num_regions_ret to be consistent with regions_ret: both of them are outgoing parameters. Now their names are also consistent with the globals like closed_heap_regions and num_closed_heap_regions.

I also rearranged the parameter order to put the outgoing ones at the end.

Copy link
Member

@calvinccheung calvinccheung left a comment

Looks good. Just one minor suggestion.

@iklam
Copy link
Member Author

@iklam iklam commented Jul 21, 2021

Thanks @calvinccheung and @yminqi for the review
/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jul 21, 2021

Going to push as commit 7dd19af.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 6346793: 8269933: test/jdk/javax/net/ssl/compatibility/JdkInfo incorrect verification of protocol and cipher support

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 21, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 21, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 21, 2021

@iklam Pushed as commit 7dd19af.

💡 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 integrated
4 participants