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

8278826: Print error if Shenandoah flags are empty (instead of crashing) #6842

Closed
wants to merge 2 commits into from

Conversation

dchuyko
Copy link
Member

@dchuyko dchuyko commented Dec 14, 2021

ShouldNotReachHere() is replaced by vm_exit_during_initialization() in few places where ShenandoahGCMode and ShenandoahGCHeuristics are examined.

Generic testing: gc/shenandoah jtreg tests.


Progress

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

Issue

  • JDK-8278826: Print error if Shenandoah flags are empty (instead of crashing)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6842

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 14, 2021

👋 Welcome back dchuyko! 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 changed the title JDK-8278826 8278826: Print error if Shenandoah flags are empty (instead of crashing) Dec 14, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 14, 2021
@openjdk
Copy link

openjdk bot commented Dec 14, 2021

@dchuyko 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 Dec 14, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 14, 2021

Webrevs

Copy link
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

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

How did you trigger those ShouldNotReachHere()? How can those options become NULL, if they have a default value?

@dchuyko
Copy link
Member Author

dchuyko commented Dec 15, 2021

It is 'Flag='. Consider following command lines:

java -XX:+UseShenandoahGC -XX:ShenandoahGCMode= -version
java -XX:+UseShenandoahGC -XX:ShenandoahGCMode=satb -XX:ShenandoahGCHeuristics= -version
java -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics= -version
java -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCMode=passive -XX:ShenandoahGCHeuristics= -version

Copy link
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

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

OK, makes sense, then. Thank you!

@openjdk
Copy link

openjdk bot commented Dec 16, 2021

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

8278826: Print error if Shenandoah flags are empty (instead of crashing)

Reviewed-by: rkennke, mli

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 32 new commits pushed to 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 Dec 16, 2021
Copy link

@Hamlin-Li Hamlin-Li 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.
Seems by changing if (ShenandoahGCHeuristics != NULL) to if (ShenandoahGCHeuristics == NULL), the trailing return NULL; could be removed.

@dchuyko
Copy link
Member Author

dchuyko commented Dec 16, 2021

Thanks. I pushed a commit that flips the condition in all 3 modes though 'return NULL;' is eliminated only in PassiveMode.

@Hamlin-Li
Copy link

Thanks for updating, still good.

@dchuyko
Copy link
Member Author

dchuyko commented Dec 17, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Dec 17, 2021

Going to push as commit 247ea71.
Since your change was applied there have been 42 commits pushed to the master branch:

  • 8c73ec1: 8278891: G1: Call reset in G1RegionMarkStatsCache constructor
  • 634afe8: Merge
  • be6b90d: 8278574: update --help-extra message to include default value of --finalization option
  • aec1b03: 8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic
  • e82310f: 8278575: update jcmd GC.finalizer_info to list finalization status
  • 7ce4aa8: 8276982: VM.class_hierarchy jcmd help output and man page text needs clarifications/improvements
  • 197c9f5: 8268573: Remove expired flags in JDK 19
  • 8f5fdd8: 8278587: StringTokenizer(String, String, boolean) documentation bug
  • 20db780: 8277868: Use Comparable.compare() instead of surrogate code
  • 937126b: 8278551: Shenandoah: Adopt WorkerThread::worker_id() to replace Shenandoah specific implementation
  • ... and 32 more: https://git.openjdk.java.net/jdk/compare/98a8d446b69fd84355731a8a3192cbd42671abb8...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 17, 2021

@dchuyko Pushed as commit 247ea71.

💡 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-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
3 participants