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

8278638: Remove FLAG_IS_CMDLINE(UseSharedSpaces) #6835

Closed
wants to merge 1 commit into from

Conversation

hseigel
Copy link
Member

@hseigel hseigel commented Dec 14, 2021

Please review this small fix for bug JDK-827638. The fix was tested by running Mach5 tiers 1 and 2 on Linux, Mac OS, and Windows, Mach5 tier 4 on Linux x64, and by building on linux-aarch64-zero and linux-x64-zero.

Thanks, Harold


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/6835/head:pull/6835
$ git checkout pull/6835

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6835

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 14, 2021

👋 Welcome back hseigel! 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 label Dec 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 14, 2021

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

@mlbridge mlbridge bot commented Dec 14, 2021

Webrevs

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Thumbs up. I think this is a trivial fix.

@openjdk
Copy link

@openjdk openjdk bot commented Dec 14, 2021

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

8278638: Remove FLAG_IS_CMDLINE(UseSharedSpaces)

Reviewed-by: dcubed, coleenp

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

  • 3f91948: 8278791: Rename ClassLoaderData::holder_phantom
  • 7761a3e: 8278761: Parallel: Remove unused PSOldPromotionLAB constructor
  • 3f9638d: 8278585: Drop unused code from OSThread
  • 8401a05: Merge
  • c93b24d: 8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently
  • 9a1bbaf: 8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_helper() after JDK-8268276
  • 9b99cbe: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64
  • 94127f4: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits
  • 624f309: 8278275: Initial nroff manpage generation for JDK 19

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 Dec 14, 2021
Copy link
Contributor

@coleenp coleenp left a comment

Looks good, also trivial. Thanks for fixing it.

@hseigel
Copy link
Member Author

@hseigel hseigel commented Dec 14, 2021

Thanks Dan, Coleen, and Yumin for looking at this. Pushing now to fix the build issues.

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 14, 2021

Going to push as commit 98a8d44.
Since your change was applied there have been 13 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Dec 14, 2021
@openjdk openjdk bot closed this Dec 14, 2021
@openjdk openjdk bot removed ready rfr labels Dec 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 14, 2021

@hseigel Pushed as commit 98a8d44.

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

@dholmes-ora
Copy link
Member

@dholmes-ora dholmes-ora commented Dec 14, 2021

Do we need to warn in this case? The original gave a warning because the user explicitly set UseSharedSpaces=true but CDS was not usable. But Xshare:auto just says "use CDS if you can", so if CDS is not available it is no big deal. The equivalent to the old code with be if the user set Xshare:on. Do we warn in other situations if Xshare:auto doesn't lead to sharing being enabled?

@hseigel
Copy link
Member Author

@hseigel hseigel commented Dec 14, 2021

If the user specified -Xshare:on then both UseSharedSpaces and RequireSharedSpaces would get set to TRUE (both before and after this change). This would cause the JNI_ERR to be returned before the check if UseSharedSpaces was specified:

  if (DumpSharedSpaces || RequireSharedSpaces) {
    jio_fprintf(defaultStream::error_stream(),
      "Shared spaces are not supported in this VM\n");
    return JNI_ERR;
  }
           ...
  if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
      log_is_enabled(Info, cds)) {
    warning("Shared spaces are not supported in this VM");
    FLAG_SET_DEFAULT(UseSharedSpaces, false);
    LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
  }
  no_shared_spaces("CDS Disabled");

So, I think that specifying -Xshare:auto is equivalent to the old -XX:+UseSharedSpace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime integrated
5 participants