RFR: 8267209: Child threads should defer logging to after child-parent handshake

David Holmes david.holmes at oracle.com
Mon May 17 06:38:38 UTC 2021


On 17/05/2021 3:40 pm, Thomas Stuefe wrote:
> On Mon, 17 May 2021 00:56:13 GMT, David Holmes <david.holmes at oracle.com> wrote:
> 
>>> Hi Thomas,
>>> This change seems okay. Arguably if we were trying to track down a problem with the initial "handshake" then we may want logging on each side of that handshake. Also logging is supposed to be nearly free if not enabled so I'm disappointed to find this causes a noticeable difference. :(
>>
>> Misread the problem. I thought the logging was an issue even when
>> disabled. With it enabled I don't really care if it causes a lag in the
>> handshake. To me this is not an issue.
>>
> 
> To me it is, since logging should disturb the timing behaviour of the VM as little as possible. Especially if the fix is that simple.

I'd argue more strongly if it weren't for the fact that when we create a 
thread suspended we can only get logging after the "handshake" with the 
creator. So this mimics that case.

David

> ..Thomas
> 
>> David
> 
> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/4042
> 


More information about the hotspot-runtime-dev mailing list