Hi Daniil, I've looked at CSR and posted a couple of questions there. It'd be nice if you help to resolve my confusion. :)
Thanks, Serguei On 2/23/20 20:21, Daniil Titov wrote:
Please review change that adds a new command line option to jhsdb tool for the debugd mode to specify a RMI connector port. Currently a random port is used that prevents the debug server from being used behind a firewall or in a container. New CSR [3] was created for this change and it needs to be reviewed as well. Man pages for jhsdb will be updated in a separate issue. The current implementation (sun.jvm.hotspot.SALauncher) parses the command line options passed to jhsdb tool, converts them to the ones for the debug server and then delegates the call to sun.jvm.hotspot.DebugServer.main(). // delegate to the actual SA debug server. 367 DebugServer.main(newArgArray.toArray(new String[0])); However, sun.jvm.hotspot.DebugServer doesn't support named options and that prevents from efficiently adding new options to the tool. I found it more suitable to start Hotspot agent directly in SALauncher rather than adding a new option in both sun.jvm.hotspot.SALauncher and sun.jvm.hotspot.DebugServer and delegating the call. With this change I think sun.jvm.hotspot.DebugServer could be marked as a deprecated but I would prefer to address it in a separate issue. Testing: Manual testing with attaching the debug server to the running Java process or to the core file inside a docker container and connecting to it with the GUI debugger. Mach5 tier1-tier3 tests (that include serviceability/sa/sadebugd tests) succeeded. [1] Webrev: http://cr.openjdk.java.net/~dtitov/8196751/webrev.01 [2] Jira issue: https://bugs.openjdk.java.net/browse/JDK-8196751 [3] CSR: https://bugs.openjdk.java.net/browse/JDK-8239831 Thank you, Daniil