RFR: 8215097: Do not create NonJavaThreads before BarrierSet
David Holmes
david.holmes at oracle.com
Mon Dec 10 23:54:34 UTC 2018
On 11/12/2018 8:59 am, Kim Barrett wrote:
>> On Dec 10, 2018, at 4:38 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>
>>> On Dec 9, 2018, at 5:05 PM, David Holmes <david.holmes at oracle.com> wrote:
>>>
>>> Didn't realize you were going to tackle this so soon. I was just ironing out the wrinkles in 8214097 before sending it for review later today. :)
>>
>> It turned out to be pretty easy. And I thought there was some chance that it would help with 8214097.
>>
>>
>>> Everything else seems fine. (I'll be reworking the BarrierSet creation assertion as part of 8214097.)
>>
>> Thanks.
>>
>> Is there actually any further change to BarrierSet installation needed for 8214097? I guess I will be finding out shortly, when your RFR comes out.
>
> I should have skimmed ahead in my mailbox; your RFR is already available in preliminary form.
>
> I’d forgotten how much bootstrapping clunkiness was needed for 8214097 without this change.
> So yeah, looks like doing mine first does help yours.
>
> Looking at yours, I kind of want the remaining bootstrapping in mine to use your change to set_as_starting_thread,
> (e.g. use your new _starting_thread to recognize it), except I think that function is called too late to use for that purpose.
Within the Thread::Thread constructor:
_starting_thread == NULL && Thread::current_or_null() == NULL =>
Creation of the main thread itself
_starting_thread == NULL && Thread::current_or_null() != NULL => The
main thread has created other threads before completing it's own
initialization - this should be an error!
_starting_thread != NULL && Thread::current() == _starting_thread =>
Safe initialisation by the main thread
else => error
Once yours is pushed I'll see how to integrate things. I have to admit I
didn't think of something as simple as adding a static flag :)
Cheers,
David
More information about the hotspot-dev
mailing list