RFR (S) 8043224: -Xcheck:jni improvements to exception checking and excessive local refs

David Simms david.simms at oracle.com
Thu May 15 13:35:18 UTC 2014


Thanks for spotting that leftover, updated review ("WARNING: JNI local 
refs: %zu, exceeds capacity: %zu")

On 05/15/2014 03:26 PM, harold seigel wrote:
> Hi David,
>
> Did you mean 'noof' or 'number of' here?
>
> +      tty->print_cr("WARNING: JNI local refs: %zu, exceeds nof 
> planned: %zu",
>
> Thanks, Harold
>
> On 5/15/2014 7:55 AM, David Simms wrote:
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8043224
>>
>> Web review: http://cr.openjdk.java.net/~dsimms/8043224/
>>
>> Check JNI:
>>
>> 1) Functions that require exception checks now set a flag. JNI 
>> exception checks clear said flag. Functions which do not allow 
>> exceptions now check the flag and warn if the programmer has failed 
>> to check for exceptions. Said flag is actually the name of the 
>> function requiring an exception check.
>>
>> 2) JNI function exit now check and warn if the number of local 
>> reference exceed the "planned number of references", i.e exceed 
>> initial frame capacity, "pushlocalframe" capacity or 
>> "ensurelocalcapacity".
>>
>> Testing:
>>
>>  * jtreg, quick vm tests
>>  * Hand rolled test run locally (no support of JNI in test libs...will
>>    hold until there is support).
>>
>>
>> Cheers
>> /David Simms
>



More information about the hotspot-runtime-dev mailing list