Skip to content
This repository has been archived by the owner. It is now read-only.

8259825: Find a better way to detect Metal framework availability on system #212



Copy link

@aghaisas aghaisas commented Mar 9, 2021

Issue :
In Lanai code-base, system profiler command was used to detect Metal framework availability. This implementation although works as expected, is slower.

Fix :
I have replaced the logic that was using system profiler command with @available check for macOS Mojave (10.14)

More Info : - mentions the HW that supports Metal framework. It is practically difficult to detect HW and then decide whether Metal framework is supported or not.
Instead, it is appropriate to check for OS version that guarantees Metal framework availability.
Please refer - - It is mentioned in the first line @ this link that "macOS Mojave requires a graphics card that supports Metal"


  • Change must not contain extraneous whitespace


  • JDK-8259825: Find a better way to detect Metal framework availability on system



$ git fetch pull/212/head:pull/212
$ git checkout pull/212

Copy link

@bridgekeeper bridgekeeper bot commented Mar 9, 2021

👋 Welcome back aghaisas! 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.

Copy link

@openjdk openjdk bot commented Mar 9, 2021

@aghaisas This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

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

8259825: Find a better way to detect Metal framework availability on system

Reviewed-by: prr

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 ready rfr labels Mar 9, 2021
Copy link

@mlbridge mlbridge bot commented Mar 9, 2021


Copy link

@kevinrushforth kevinrushforth commented Mar 9, 2021

This only downside of this is that it will be no longer possible to run the Metal pipeline on macOS 10.13 systems. Since Apple no longer supports macOS 10.13, this is probably fine, but I recommend waiting to integrate this until @prrace approves it.

Copy link
Collaborator Author

@aghaisas aghaisas commented Mar 9, 2021

I have raised this PR now as a response to the review comment at openjdk/jdk#2403 (comment)
I will wait for the consensus regarding the approach before integrating.

prrace approved these changes Mar 9, 2021
Copy link

@prrace prrace left a comment

Probably a good thing to make this policy change before integration.
I don't see metal as important for 10.13 systems anyway.

Copy link
Collaborator Author

@aghaisas aghaisas commented Mar 10, 2021


@openjdk openjdk bot closed this Mar 10, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Mar 10, 2021
Copy link

@openjdk openjdk bot commented Mar 10, 2021

@aghaisas Since your change was applied there have been 16 commits pushed to the master branch:

  • 8ba59cf: Automatic merge of jdk:master into master
  • d0c1aec: 8263140: Japanese chars garble in console window in HSDB
  • 70342e8: 8262520: Add SA Command Line Debugger support to connect to debug server
  • e5ce97b: 8263206: assert(*error_msg != '\0') failed: Must have error_message while parsing -XX:CompileCommand=unknown
  • 3212f80: 8261937: LambdaForClassInBaseArchive: SimpleApp$$Lambda$1 missing
  • 2218e72: 8262486: Merge trivial JDWP agent changes from the loom repo to the jdk repo
  • 86fac95: 8263142: Delete unused entry points in libawt/libawt_xawt/libawt_headless
  • b7f0b3f: 8252173: Use handles instead of jobjects in modules.cpp
  • a6e34b3: 8262829: Native crash in Win32PrintServiceLookup.getAllPrinterNames()
  • fbe40e8: 8252399: Update mapMulti documentation to use type test pattern instead of instanceof once JEP 375 exits preview
  • ... and 6 more:

Your commit was automatically rebased without conflicts.

Pushed as commit d729f30.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants