Skip to content

Conversation

@albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Aug 16, 2021

Simple refactoring of GenericTaskQueue initialization API.

Test: tier1_gc


Progress

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

Issue

  • JDK-8272520: Inline GenericTaskQueue::initialize() to the constructor

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5125

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 16, 2021

👋 Welcome back ayang! 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 Aug 16, 2021
@openjdk
Copy link

openjdk bot commented Aug 16, 2021

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

  • hotspot-gc
  • shenandoah

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 hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Aug 16, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 16, 2021

Webrevs

Copy link

@kimbarrett kimbarrett 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. Just a couple minor nits.

inline void GenericTaskQueue<E, F, N>::initialize() {
inline GenericTaskQueue<E, F, N>::GenericTaskQueue() : _last_stolen_queue_id(InvalidQueueId), _seed(17 /* random number */) {
assert(sizeof(Age) == sizeof(size_t), "Depends on this.");
_elems = ArrayAllocator<E>::allocate(N, F);

Choose a reason for hiding this comment

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

_elems could be initialized in the mem-initializer-list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

template<class E, MEMFLAGS F, unsigned int N>
inline void GenericTaskQueue<E, F, N>::initialize() {
inline GenericTaskQueue<E, F, N>::GenericTaskQueue() : _last_stolen_queue_id(InvalidQueueId), _seed(17 /* random number */) {
assert(sizeof(Age) == sizeof(size_t), "Depends on this.");

Choose a reason for hiding this comment

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

[pre-existing] This assert is over-constraining. The real requirement is static-asserted in the Age class.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

@openjdk
Copy link

openjdk bot commented Aug 16, 2021

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

8272520: Inline GenericTaskQueue::initialize() to the constructor

Reviewed-by: kbarrett, iwalulya

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

  • 0e3fde6: 8264274: Block tags in overview.html are ignored
  • c5c84b8: 8270312: Error: Not a test or directory containing tests: java/awt/print/PrinterJob/XparColor.java
  • df1427b: 8272446: C1: Raw version of UnsafeGet generates load barriers
  • 989f39f: 8272552: mark hotspot runtime/cds tests which ignore external VM flags
  • ee8bf10: 8272327: Shenandoah: Avoid enqueuing duplicate string candidates
  • 3fb1927: 8271227: Missing {@code } in com.sun.source.*
  • a5ad772: 8272342: [TEST_BUG] java/awt/print/PrinterJob/PageDialogMarginTest.java catches all exceptions
  • ae45592: 8272374: doclint should report missing "body" comments
  • b2c272d: 8272305: several hotspot runtime/modules don't check exit codes
  • 8268825: 8272297: FileInputStream should override transferTo() for better performance
  • ... and 4 more: https://git.openjdk.java.net/jdk/compare/5db36cedc91d0954ececd309a5f8f59ea828f6c1...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 ready Pull request is ready to be integrated label Aug 16, 2021
Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Looks even better.

@albertnetymk
Copy link
Member Author

Thanks for the review.

/integrate

@openjdk
Copy link

openjdk bot commented Aug 17, 2021

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

  • ed57cf1: 8266182: Automate manual steps listed in the test jdk/sun/security/pkcs12/ParamsTest.java
  • 0e3fde6: 8264274: Block tags in overview.html are ignored
  • c5c84b8: 8270312: Error: Not a test or directory containing tests: java/awt/print/PrinterJob/XparColor.java
  • df1427b: 8272446: C1: Raw version of UnsafeGet generates load barriers
  • 989f39f: 8272552: mark hotspot runtime/cds tests which ignore external VM flags
  • ee8bf10: 8272327: Shenandoah: Avoid enqueuing duplicate string candidates
  • 3fb1927: 8271227: Missing {@code } in com.sun.source.*
  • a5ad772: 8272342: [TEST_BUG] java/awt/print/PrinterJob/PageDialogMarginTest.java catches all exceptions
  • ae45592: 8272374: doclint should report missing "body" comments
  • b2c272d: 8272305: several hotspot runtime/modules don't check exit codes
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/5db36cedc91d0954ececd309a5f8f59ea828f6c1...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 17, 2021
@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 Aug 17, 2021
@openjdk
Copy link

openjdk bot commented Aug 17, 2021

@albertnetymk Pushed as commit 2aaf795.

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

@albertnetymk albertnetymk deleted the ctor-init branch August 17, 2021 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants