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

8253639: Change os::attempt_reserve_memory_at parameter order #359

Conversation

stefank
Copy link
Member

@stefank stefank commented Sep 25, 2020

I propose that we change the parameter order from:
os::attempt_reserve_memory_at(size, addr, )

to:
os::attempt_reserve_memory_at(addr, size, )

This patch builds upon the changes in pull/357. There's currently no way to create an incremental review, but I want to get this out for review now. So, unfortunately you have to ignore the first commit and look at the second commit.

/label hotspot


Progress

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

Issue

  • JDK-8253639: Change os::attempt_reserve_memory_at parameter order

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/359/head:pull/359
$ git checkout pull/359

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 25, 2020

👋 Welcome back stefank! 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 rfr Pull request is ready for review hotspot hotspot-dev@openjdk.org labels Sep 25, 2020
@openjdk
Copy link

openjdk bot commented Sep 25, 2020

@stefank
The hotspot label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Sep 25, 2020

Webrevs

@tstuefe
Copy link
Member

tstuefe commented Sep 25, 2020

Looks good to me.

I still learn to skara and just noticed that as a reviewer I cannot use /reviewer. Since this PR contains commits from some other PR, I don't know how to mark this as reviewed.

@stefank
Copy link
Member Author

stefank commented Sep 25, 2020

Thanks Thomas. You need to click "Files changed" then "Review Changes" to review this. I don't think there's a /reviewer command you can use. I'll ask.

@stefank
Copy link
Member Author

stefank commented Sep 25, 2020

Currently, the /reviewer command is only there to the PR owner to credit additional reviewers. I've created a Skara ticket asking if this could be enhanced:
https://bugs.openjdk.java.net/browse/SKARA-736

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Parameter reordering looks good.

@openjdk
Copy link

openjdk bot commented Sep 25, 2020

@stefank 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 more details.

After integration, the commit message for the final commit will be:

8253639: Change os::attempt_reserve_memory_at parameter order

Reviewed-by: tschatzl, iklam

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:

  • fed3636: 8252219: C2: Randomize IGVN worklist for stress testing

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 Pull request is ready to be integrated label Sep 25, 2020
@iklam
Copy link
Member

iklam commented Sep 25, 2020

Could you add an explanation in the bug report for the reason of this change?

@stefank
Copy link
Member Author

stefank commented Sep 25, 2020

Could you add an explanation in the bug report for the reason of this change?

Sure. I thought it was obvious, but I agree a comment would be good. I added:

The motivation is that it's simply awkward to have attempt_reserve_memory_at use the opposite order of most other memory range APIs.

Examples of APIs using the order addr, size:
1) void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
2) PVOID VirtualAlloc2(..., BaseAddress, Size, ...)
3) ReservedMemoryRegion(address base, size_t size)
4) MemRegion(HeapWord* start, size_t word_size)
5) ReservedSpace(char* base, size_t size
6) commit_memory(char* addr, size_t bytes, bool executable) 

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.

@stefank
Copy link
Member Author

stefank commented Sep 25, 2020

Thanks all for reviewing!

@stefank
Copy link
Member Author

stefank commented Sep 28, 2020

Continuing this experiment to build a PR on top of another PR. I added a commit to parent PR pull/357, merged in master, and pushed pull/359's branch. "Files changed" now looks as expected, and only contains the changes relevant for this PR.

@stefank
Copy link
Member Author

stefank commented Sep 28, 2020

/integrate

@openjdk openjdk bot closed this Sep 28, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 28, 2020
@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@stefank Since your change was applied there has been 1 commit pushed to the master branch:

  • fed3636: 8252219: C2: Randomize IGVN worklist for stress testing

Your commit was automatically rebased without conflicts.

Pushed as commit ca1ed16.

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

@stefank stefank deleted the 8253639_attempt_reserve_memory_param_order branch September 28, 2020 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
4 participants