RFR: 8342995: Enhance Attach API to support arbitrary length arguments - Linux
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Dec 11 11:24:42 UTC 2024
On Tue, 19 Nov 2024 00:04:16 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> The fix updates Linux (and server-side of macosx) implementation to support Attach API v2 (shared code and Windows implementation were introduced by #20782)
>
> Testing: tier1,tier2,tier3,tier4,hs-tier5-svc
> manually tested backward compatibility (old tools can attach to current VMs, current tools can attach to older VMs) with jdk21 and jdk8.
src/hotspot/os/posix/attachListener_posix.cpp line 145:
> 143: private:
> 144: // the connection to the client
> 145: SocketChannel _socket;
Nit: The name `_socket` is misleading. I'd suggest to rename it to `_socket_channel`.
src/hotspot/share/services/attachListener.hpp line 251:
> 249: // Attach client can make sanity connect/disconnect.
> 250: // In the case we get "premature EOF" error.
> 251: // If "may_be_empty" is true, the error is not logged.
Nits or two minor suggestions:
- replace: "In the case" => "In that case"
- replace: "may_be_empty" => may_be_empty
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22223#discussion_r1879883033
PR Review Comment: https://git.openjdk.org/jdk/pull/22223#discussion_r1879876017
More information about the serviceability-dev
mailing list