RFR: 8210321: Create NO_KEEPALIVE CLD holder accessor
Erik Österlund
erik.osterlund at oracle.com
Fri Sep 7 11:14:53 UTC 2018
Hi Coleen,
Sure. Will do before pushing.
Thanks,
/Erik
On 2018-09-05 22:24, coleen.phillimore at oracle.com wrote:
>
> Me again, can you use this function in the assert here:
>
> inline oop ClassLoaderData::class_loader() const {
> assert(!_unloading, "This oop is not available to unloading class
> loader data");
> assert(_holder.is_null() || _holder.peek() != NULL , "This class
> loader data holder must be alive");
> return _class_loader.resolve();
> }
>
> Thanks,
> Coleen
>
> On 9/5/18 9:27 AM, coleen.phillimore at oracle.com wrote:
>>
>>
>> On 9/4/18 8:38 AM, Erik Österlund wrote:
>>> Hi Coleen,
>>>
>>> I specifically need this one for reading the holder without marking
>>> it, so that my GC code can subsequently mark it with either
>>> finalizable or strong marking, depending on whether we are marking
>>> the subgraph reachable from finalizers, or from strong roots
>>> concurrently. The klass_holder() accessor applies strong load
>>> barriers (as it is not AS_NO_KEEPALIVE).
>>
>> Yes, I see why. I meant that the function is_alive() can now be
>> written calling this holder_no_keep_alive() function, so we don't
>> have two places for the "peek" call. But I retract that because we'd
>> be checking for null holder twice.
>>
>> We still need the keep_alive bit for some subtle reason (module
>> loading during bootstrap, I believe).
>>
>> thanks,
>> Coleen
>>
>>>
>>> Thanks,
>>> /Erik
>>>
>>> On 2018-09-04 14:29, coleen.phillimore at oracle.com wrote:
>>>>
>>>>
>>>> On 9/4/18 8:02 AM, coleen.phillimore at oracle.com wrote:
>>>>>
>>>>> I thought the ClassLoaderData::is_alive() function would do this
>>>>> for you?
>>>>
>>>> Or can you call this new function from is_alive()?
>>>> thanks
>>>> Coleen
>>>>
>>>>> thanks,
>>>>> Coleen
>>>>>
>>>>> On 9/3/18 10:38 AM, Erik Österlund wrote:
>>>>>> Hi,
>>>>>>
>>>>>> In order to perform concurrent class unloading, ZGC needs a way
>>>>>> to peek the holder without keeping it alive.
>>>>>>
>>>>>> Webrev:
>>>>>> http://cr.openjdk.java.net/~eosterlund/8210321/webrev.00/
>>>>>>
>>>>>> Bug:
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8210321
>>>>>>
>>>>>> Thanks,
>>>>>> /Erik
>>>>>
>>>>
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list