Skip to content

8342647: [macosx] Clean up the NSInvocation based call to NSProcessInfo.operatingSystemVersion #21595

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

Closed
wants to merge 2 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Oct 20, 2024

Can I please get a review of this change which does a tiny cleanup in the macosx specific code in java_props_macosx.c?

As noted in https://bugs.openjdk.org/browse/JDK-8342647 the setOSNameAndVersion function used to dynamically call NSProcessInfo.operatingSystemVersion because that property wasn't (statically) available until macosx 10.10 version. Since that version this property has been available even in the latest macosx versions https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion, so it's now possible to statically reference it in the code.

The change in this PR replaces the use of NSInvocation with the static reference to this property. No new tests have been added. Existing tier1, tier2 and tier3 tests with this change have all passed.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8342647: [macosx] Clean up the NSInvocation based call to NSProcessInfo.operatingSystemVersion (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21595/head:pull/21595
$ git checkout pull/21595

Update a local copy of the PR:
$ git checkout pull/21595
$ git pull https://git.openjdk.org/jdk.git pull/21595/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21595

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21595.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2024

👋 Welcome back jpai! 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 bot commented Oct 20, 2024

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

8342647: [macosx] Clean up the NSInvocation based call to NSProcessInfo.operatingSystemVersion

Reviewed-by: bchristi

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

  • f340ab2: 8342181: Update tests to use stronger Key and Salt size
  • cc2fb4d: 8337276: jcmd man page update for PID in output filenames
  • 02ea4b5: 8342635: javax/swing/JFileChooser/FileSystemView/WindowsDefaultIconSizeTest.java creates tmp file in src dir
  • 7461dfe: 8341788: Fix ExceptionOccurred in hotspot
  • 9a9ac1d: 8341927: Replace hardcoded security providers with new test.provider.name system property
  • 1b177ce: 8343103: Enable debug logging for vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/TestDescription.java
  • 7404ddf: 8202100: Merge vm/share/InMemoryJavaCompiler w/ jdk/test/lib/compiler/InMemoryJavaCompiler
  • 821c514: 8341692: Implement JEP 490: ZGC: Remove the Non-Generational Mode
  • 0fe15d6: 8343040: Clean up references to JRE in the launcher code
  • 9003524: 8342588: Shenandoah: Pull shared closures together in one header
  • ... and 138 more: https://git.openjdk.org/jdk/compare/309b929147e7dddfa27879ff31b1eaad271def85...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 rfr Pull request is ready for review label Oct 20, 2024
@openjdk
Copy link

openjdk bot commented Oct 20, 2024

@jaikiran The following label will be automatically applied to this pull request:

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Oct 20, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 20, 2024

Webrevs

@jaikiran
Copy link
Member Author

Any reviews for this one please?

Copy link
Member

@bchristi-git bchristi-git left a comment

Choose a reason for hiding this comment

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

It's great that we can finally call the function statically. =D

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 31, 2024
@jaikiran
Copy link
Member Author

jaikiran commented Nov 7, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Nov 7, 2024

Going to push as commit 9e31e78.
Since your change was applied there have been 253 commits pushed to the master branch:

  • e33dc13: 8343343: Misc crash dump improvements on more platforms after JDK-8294160
  • d20ccd1: 8335583: Avoid using pointers in CDS tables
  • 342fe42: 8342270: Test sun/security/pkcs11/Provider/RequiredMechCheck.java needs write access to src tree
  • 78b378a: 8342540: InterfaceCalls micro-benchmark gives misleading results
  • c0e6c3b: 8343214: Fix encoding errors in APX New Data Destination Instructions Support
  • 0be7118: 8279016: JFR Leak Profiler is broken with Shenandoah
  • 6811a11: 8341408: Implement JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)
  • 72a45dd: 8341834: C2 compilation fails with "bad AD file" due to Replicate
  • 57c3bb6: 8343068: C2: CastX2P Ideal transformation not always applied
  • 83f3d42: 8339303: C2: dead node after failing to match cloned address expression
  • ... and 243 more: https://git.openjdk.org/jdk/compare/309b929147e7dddfa27879ff31b1eaad271def85...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 7, 2024

@jaikiran Pushed as commit 9e31e78.

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

@jaikiran jaikiran deleted the 8342647 branch November 7, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants