RFR: 8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m [v2]

Phil Race prr at openjdk.java.net
Wed Feb 3 20:17:05 UTC 2021


On Tue, 2 Feb 2021 20:27:17 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m
>
> src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m line 294:
> 
>> 292: 
>> 293:   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>> 294:   @try {
> 
> Although there are only 3 places where the `JNF_COCOA_ENTER/EXIT` macros are used, it seems it would still be worth taking the same approach you did for `java.desktop` and add the replacement macros instead of inlining them. So just copy what you added to `src/java.desktop/macosx/native/libosxapp/JNIUtilities.h`, and replace `JNF_COCOA_ENTER` with `JNI_COCOA_ENTER/EXIT`. Otherwise the `JNF_COCOA_ENTER/EXIT` changes look fine to me, but I'm just basing this on a comparison with what you've done with `java.desktop`. I'm no expert in this area.

OK .. I don't really mind either way and if this helps gets it pushed .. so I've updated.

> src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m line 296:
> 
>> 294:   @try {
>> 295: 
>> 296:   NSString *symbolNameString = JavaStringToNSString(env, symbolName);
> 
> 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`.

As Magnus said that is in progress. Hoping it will be pushed very soon.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2304



More information about the build-dev mailing list