RFR: 8175318: Performance issue regarding local JNI references
Kim Barrett
kim.barrett at oracle.com
Thu Jul 20 21:09:18 UTC 2017
> On Jul 19, 2017, at 4:11 AM, Aleksey Shipilev <shade at redhat.com> wrote:
>
> Hi Kim,
>
> On 07/19/2017 01:39 AM, Kim Barrett wrote:
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8175318/hotspot.00/
>
> This makes sense to me.
>
> Do you want to introduce a utility method that clearly captures "top == 0", and
> pair it with "clear()"? E.g.:
>
> void clear() { _top == 0: } // already have one
> bool is_clear() { return _top == 0; }
>
> Thanks,
> -Aleksey
Thanks for reviewing.
I decided not to bother with is_clear() right now. There would just be the couple of
uses in the vicinity of this change, plus a !is_clear() in print_statistics. If anything,
I’d be inclined to remove the unused clear() function. I looked at the places where
we zero _top, and I don’t think any of them are particularly improved by calling clear().
More information about the hotspot-runtime-dev
mailing list