RFR: 8342995: Enhance Attach API to support arbitrary length arguments - Linux

Kevin Walls kevinw at openjdk.org
Mon Dec 9 17:04:39 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.

Looks good I think.  (These are kind of hard to read, or hard to appreciate as a whole!)


VirtualMachineImpl.java and attachListener_PLATFORM.cpp have much in common between platforms, but maybe creating new common base classes is an interesting refactor work with not that much payoff.  Plus there are AIX versions that some of us don't build and test (which I think you mentioned elsewhere).



On Windows, attachListener_windows.cpp operations have:  assert(opened(), "must be");
...I was wondering if we don't need a similar assert in in src/hotspot/os/posix/attachListener_posix.cpp
But probably the different usage pattern explains that, i.e.
Windows' PipeChannel needs the open() method specifically called, but for Posix it creates the socket on construction.

(so this is fine, just some observations)

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

PR Review: https://git.openjdk.org/jdk/pull/22223#pullrequestreview-2489435258


More information about the serviceability-dev mailing list