RFR: 8188102: [JVMCI] Convert special JVMCI oops in nmethod to jweak values

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Nov 2 22:03:37 UTC 2017


Seems good to me.

Thanks,
Vladimir

On 11/2/17 12:37 AM, Doug Simon wrote:
> 
> 
>> On 2 Nov 2017, at 04:47, Kim Barrett <kim.barrett at oracle.com> wrote:
>>
>>> On Nov 1, 2017, at 5:10 PM, Doug Simon <doug.simon at oracle.com> wrote:
>>>
>>>
>>>
>>>> On 1 Nov 2017, at 18:57, Kim Barrett <kim.barrett at oracle.com> wrote:
>>>>
>>>>> On Nov 1, 2017, at 5:44 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
>>>>>
>>>>> Hi Kim,
>>>>>
>>>>> On 2017-11-01 06:03, Kim Barrett wrote:
>>>>>>> On Oct 30, 2017, at 7:14 AM, Doug Simon <doug.simon at oracle.com> wrote:
>>>>> JNIHandles::resolve with G1 should conditionally enqueue the oops if the SATB queue is activated, which it will not be after marking terminated. At this point, marking should have terminated already, and hence the resolve will not change the liveness of the oop. So I don't quite see how the resolve will change the oop to live here. Am I missing something?
>>>>
>>>> Does this nmethod pass get run during young collections?  If not, then maybe you are right that it doesn’t matter.
>>>>
>>>> But I still think that a cleanup pass that is based on using weak references like this should just be properly ordered
>>>> wrto weak reference processing, as it presumably already was.  In which case the resolve and can_unload is
>>>> effectively useless; either the jweak has been cleared and we won’t reach this clause, or the jweak has not been
>>>> cleared because the referent is still live, in which case can_unload will always return false and there was no point
>>>> in calling it.
>>>
>>> I agree. As stated previously, my (defensive) code is based on assuming that nmethod unloading might happen before reference processing. If it never/rarely happens, then your suggested change is the right one. I did some extra testing and never saw it happen. Based on that, I'd like to adopt your solution. In the worst case, nmethod unloading will be delayed one full GC cycle if nmethod unloading precedes reference processing.
>>>
>>> I've created another rev based on this:
>>>
>>> http://cr.openjdk.java.net/~dnsimon/8188102_3
>>>
>>> -Doug
>>
>> This looks good.
> 
> Can I please get sign off from someone in the compiler team. Thanks.
> 
> -Doug
> 


More information about the hotspot-compiler-dev mailing list