RFR(s): 8198267: Allow GCId::current_raw() calls from non-NamedThreads

Stefan Karlsson stefan.karlsson at oracle.com
Mon Feb 19 13:37:40 UTC 2018


On 2018-02-19 14:08, Per Liden wrote:
> Got some off-line feedback from StefanK. After some discussions we 
> decided to also make the following changes:
> 
> 1) Renamed current_raw() to current_or_undefined()
> 2) Replaces a few uses of current_raw() with currentNamedThread->gc_id()
> 3) Removes the special constructor for AbstractGangTask, which is no 
> longer needed. With the new semantics of current_or_undefined() the 
> default constructor can be used by G1PretouchTask.

For the record, I think I would have preferred to use GCId::current() in 
AbstractGangTask, and GCId::current_or_undefined() when setting up 
G1PretouchTask, but I'm not going to push for this.

> 
> Webrev: http://cr.openjdk.java.net/~pliden/8198267/webrev.1/

Looks good.

Thanks,
StefanK

> 
> /Per
> 
> On 02/16/2018 02:30 PM, Per Liden wrote:
>> Patch to allow GCId::current_raw() calls from non-NamedThreads. This 
>> is needed when, for example, an Access barrier executed by a Java 
>> thread calls into GC-code.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8198267
>> Webrev: http://cr.openjdk.java.net/~pliden/8198267/webrev.0/
>>
>> /Per
>>


More information about the hotspot-gc-dev mailing list