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

8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m #2304

Closed
wants to merge 3 commits into from
Closed

8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m #2304

wants to merge 3 commits into from

Conversation

prrace
Copy link
Contributor

@prrace prrace commented Jan 28, 2021

This removes the JNF dependency from the jdk.hotspot.agent module.
The macro expansions are the same as already used in the Java desktop module - which actually uses a macro
still but there there are hundreds of uses.
The function of this macro code is to prevent NSExceptions escaping to Java and also to drain the auto-release pool.
What test group would be good for verifying this change ?


Progress

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

Issue

  • JDK-8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2304/head:pull/2304
$ git checkout pull/2304

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 28, 2021

👋 Welcome back prr! 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 Jan 28, 2021

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

  • build
  • serviceability

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 serviceability serviceability-dev@openjdk.org build build-dev@openjdk.org labels Jan 28, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 29, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 29, 2021

Webrevs

@plummercj
Copy link
Contributor

For testing you want test/jdk/sun/tools/jhsdb/ and test/hotspot/jtreg/serviceability/sa

@plummercj
Copy link
Contributor

I'm doubtful you'll find anyone on serviceability-dev that understands JNF and the implications it has on MacosxDebuggerLocal.m. Although I've done a lot of work in this file myself recently, it's all bee sans any knowledge of JNF, Cocoa, or Objective C. You might be better off asking reviewers that looked at other recent PRs to remove JNF usage.

However, having looked through JDK-8257852 and from there finding JDK-8259651, I'm wondering why you didn't just replace JNF_COCOA_ENTER/EXIT with the new JNI_COCOA_ENTER/EXIT in this PR also? Is it because they are not in a place that can be accessed from this file?

Copy link
Member

@magicus magicus left a comment

Choose a reason for hiding this comment

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

Build changes look good.

@openjdk
Copy link

openjdk bot commented Jan 29, 2021

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

8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m

Reviewed-by: ihse, cjplummer

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

  • f025bc1: 8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N"
  • 4a8b5c1: 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
  • 472bf62: 8258799: [Testbug] RandomCommandsTest must check if tested directive is added via jcmd
  • b0ee7a8: 8241995: Clarify InetSocketAddress::toString specification
  • 0ef93fe: 8259265: Refactor UncaughtExceptions shell test as java test.
  • 5324b5c: 8260998: Shenandoah: Restore reference processing statistics reporting
  • c8de943: 8260617: Merge ZipFile encoding check with the initial hash calculation
  • ae2c5f0: 8260581: IGV: enhance node search
  • 9037615: 8222850: jshell tool: Misleading cascade compiler error in switch expression with undefined vars
  • 91e6c75: 8260928: InitArrayShortSize constraint func should print a helpful error message
  • ... and 61 more: https://git.openjdk.java.net/jdk/compare/15196325977254ee73d96bf99be62c520de59af9...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 Jan 29, 2021
@prrace
Copy link
Contributor Author

prrace commented Jan 29, 2021

Is it because they are not in a place that can be accessed from this file?
Right 99% of JNF usage was the desktop module many, many files, 1300 references .. the entire rest of the JDK had just 3 files each in a different module ! It did not seem worth creating a JDK-wide platform-specific library to support this.

@prrace
Copy link
Contributor Author

prrace commented Jan 30, 2021

For testing you want test/jdk/sun/tools/jhsdb/ and test/hotspot/jtreg/serviceability/sa

These tests passed with my changes

@mlbridge
Copy link

mlbridge bot commented Feb 3, 2021

Mailing list message from Magnus Ihse Bursie on build-dev:

On 2021-02-02 21:47, Chris Plummer wrote:

Is there a reason why `java.desktop` continues to use `JNFJavaToNSString`? I was looking to see how this was handled in other places, but I couldn't find an example where `JNFJavaToNSString` was converted to call a newly implemented `JavaStringToNSString`.

That conversion is handled in https://github.com//pull/2305.

/Magnus

@prrace
Copy link
Contributor Author

prrace commented Feb 3, 2021

/integrate

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

openjdk bot commented Feb 3, 2021

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

  • f025bc1: 8260301: misc gc/g1/unloading tests fails with "RuntimeException: Method could not be enqueued for compilation at level N"
  • 4a8b5c1: 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
  • 472bf62: 8258799: [Testbug] RandomCommandsTest must check if tested directive is added via jcmd
  • b0ee7a8: 8241995: Clarify InetSocketAddress::toString specification
  • 0ef93fe: 8259265: Refactor UncaughtExceptions shell test as java test.
  • 5324b5c: 8260998: Shenandoah: Restore reference processing statistics reporting
  • c8de943: 8260617: Merge ZipFile encoding check with the initial hash calculation
  • ae2c5f0: 8260581: IGV: enhance node search
  • 9037615: 8222850: jshell tool: Misleading cascade compiler error in switch expression with undefined vars
  • 91e6c75: 8260928: InitArrayShortSize constraint func should print a helpful error message
  • ... and 61 more: https://git.openjdk.java.net/jdk/compare/15196325977254ee73d96bf99be62c520de59af9...master

Your commit was automatically rebased without conflicts.

Pushed as commit 2be60e3.

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

@prrace prrace deleted the jnf_debug branch February 10, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants