RFR: 8339289: Enhance Attach API to support arbitrary length arguments - Windows [v5]

Kevin Walls kevinw at openjdk.org
Thu Oct 24 21:32:05 UTC 2024


On Thu, 24 Oct 2024 18:58:26 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> The fix improves Attch API protocol and implements updated protocol on windows; shared code is ready to implement updated protocol support on other platforms.
>> More detailed explanations on the 1st comment.
>> 
>> 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) on Windows with jdk21u and jdk8u.
>
> Alex Menkov has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - renamed getVersion command
>  - typos

Marked as reviewed by kevinw (Reviewer).

Thanks for updating, looks good.  I think it's clearer now that this is not just a Windows-specific fix, but will be an enhancement for all platforms in the long term.  Likely argument length is more of a limitation than number of arguments.

Looking back at JDK-8215622: Add dump to file support for jmap –histo
..and that was extending the "inspectheap" attach command, but it should have been using a DiagnosticCommand invoked by jcmd.  We may not say it clearly, but the attach api commands are a few basic fundamentals, and most of what we want to implement should be implemented in a DiagnosticCommand.

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

PR Review: https://git.openjdk.org/jdk/pull/20782#pullrequestreview-2393738967
PR Comment: https://git.openjdk.org/jdk/pull/20782#issuecomment-2436370162


More information about the serviceability-dev mailing list