[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    Re: RFR: 8209976: Improve iteration over non-JavaThreads
From:       Kim Barrett <kim.barrett () oracle ! com>
Date:       2018-08-28 20:02:34
Message-ID: ED1B6B13-F744-47B3-802B-8267C20EC3E9 () oracle ! com
[Download RAW message or body]

> On Aug 28, 2018, at 1:38 PM, Roman Kennke <rkennke@redhat.com> wrote:
> 
> Looks good to me too.

Thanks.

> 
> Roman
> 
>> 
>> This looks good.  Thank you for making Thread class abstract.
>> 
>> Coleen
>> 
>> On 8/27/18 9:36 PM, Kim Barrett wrote:
>>>> On Aug 27, 2018, at 2:08 PM, coleen.phillimore@oracle.com wrote:
>>>> 
>>>> 
>>>> This looks like a good improvement.  So there are either JavaThreads
>>>> or NonJavaThreads but no Thread now?   Should Thread be made abstract
>>>> so it cannot be instantiated?
>>> Thanks for reviewing.
>>> 
>>> We don't ever directly instantiate Thread.  I can make it abstract.
>>> 
>>> The canonical way to make a class abstract if it isn't already seems
>>> to be to make the virtual destructor pure. Below is the diff from
>>> open.01 that I'm running through testing.
>>> 
>>> diff -r 7587d014de95 src/hotspot/share/runtime/thread.hpp
>>> --- a/src/hotspot/share/runtime/thread.hpp    Mon Aug 27 13:17:40 2018
>>> -0400
>>> +++ b/src/hotspot/share/runtime/thread.hpp    Mon Aug 27 21:20:05 2018
>>> -0400
>>> @@ -385,7 +385,7 @@
>>>       // Constructor
>>>     Thread();
>>> -  virtual ~Thread();
>>> +  virtual ~Thread() = 0;        // Thread is abstract.
>>>       // Manage Thread::current()
>>>     void initialize_thread_current();
>>> 
>>>> thanks,
>>>> Coleen
>>>> 
>>>> On 8/27/18 1:34 PM, Kim Barrett wrote:
>>>>>> On Aug 27, 2018, at 12:09 PM, Kim Barrett <kim.barrett@oracle.com>
>>>>>> wrote:
>>>>>> Hm, except that I seem to have forgotten to remove the
>>>>>> now obsolete asserts from GlobalCounter::critical_section_begin/end.
>>>>> New webrevs:
>>>>> full: http://cr.openjdk.java.net/~kbarrett/8209976/open.01/
>>>>> incr: http://cr.openjdk.java.net/~kbarrett/8209976/open.01.inc/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic