RFR: 8316927: JFR: Move shouldCommit check earlier for socket events
Alan Bateman
alanb at openjdk.org
Tue Sep 26 08:00:13 UTC 2023
On Mon, 25 Sep 2023 16:57:46 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> Hi,
>
> The events for socket read and socket write retrieves the remote address even in cases where the event didn't exceed the threshold. By moving the shouldCommit check earlier, it can be avoided.
>
> Testing: jdk/jdk/jfr
>
> Thanks
> Erik
The update looks okay. For SC, remoteAddress() just returns the address, it doesn't create a new ISA each time, unlike the Socket code.
At some point I think we should re-format SocketReadEvent to reduce the wildly long lines as it's really hard to look at the changes side-by-side right now. We also need to update sun.nio.ch.Socket{Input,Output}Stream to emit events as they are currently missed so the events are incomplete.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15908#pullrequestreview-1643604401
More information about the hotspot-jfr-dev
mailing list