RFR: 8310996: Add JFR event for connect operations

Tim Prinzing tprinzing at openjdk.org
Mon Oct 21 00:37:38 UTC 2024


On Wed, 16 Oct 2024 06:40:33 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Adds a JFR event for socket connect operations.
>> 
>> Existing tests TestSocketEvents and TestSocketChannelEvents modified to also check for connect events.
>
> src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java line 624:
> 
>> 622:                 SocketConnectEvent.commit(start, duration, isa.getHostString(), address.getHostAddress(), port, connected);
>> 623:             }
>> 624:         }
> 
> Would it be possible to update the JBS or PR description to indicate if the intent is to record an event when the connection cannot be established? I'm asking because the change will only record an event when a connection is successfully established ("connected" is always true here).
> 
> JFR will record exceptions already of course but I think for troubleshooting purposes, recording an event when "connect" hangs and eventually fails is very useful to have.

Capturing all calls even if they threw an exception does seem pretty useful.  I'll update the JBS

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21528#discussion_r1807983535


More information about the hotspot-jfr-dev mailing list