RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-08 Thread Langer, Christoph
Hi Alan, Ralf has opened a CSR for JDK-8214892: https://bugs.openjdk.java.net/browse/JDK-8223456 What will we do now? Shall we use this CSR to discuss how the VM options and jcmds/dcmds for "debugging on demand" will be named and what they will be? And in case, the outcome is different to

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-08 Thread Langer, Christoph
Hi Ralf, thanks for the new webrev. It looks good. In GetListenAddressTest.java, the directive "@modules java.base/jdk.intenal.vm" can be removed as well. I've loaded the patch with this modification into our test system. But anyway, we'll need to wait for the CSR discussion until it can be

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-07 Thread Alan Bateman
On 07/05/2019 14:13, Schmelter, Ralf wrote: Hi Christoph, thanks for the review. I've updated the webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8223065/webrev.4/ Specifying onjcmd=y to the debugger agent looks very strange. Was there a CSR submitted for JDK-8214892? I suspect that

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-07 Thread Schmelter, Ralf
Hi Christoph, thanks for the review. I've updated the webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8223065/webrev.4/ Best regards, Ralf

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-07 Thread Langer, Christoph
Hi Ralf, the change looks good to me, overall. I found a few minor nits in the tests. test/jdk/com/sun/jdi/OnJcmdTest.java 3 * Copyright (c) 2018, 2019, SAP SE. All rights reserved. -> according to our guidelines, we should not have a ',' after the last year for the SAP copyrights 33 * @run

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-05-06 Thread Baesken, Matthias
Hello, looked at the latest web rev ( http://cr.openjdk.java.net/~rschmelter/webrevs/8223065/webrev.3/ ) , looks good to me ! (not a Reviewer however ) Best regards, Matthias > > On 30/04/2019 9:33 pm, Schmelter, Ralf wrote: > > Hi David, > > > > good catch. I've moved the vm->native

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-30 Thread Chris Plummer
On 4/30/19 4:30 AM, Schmelter, Ralf wrote: Hi Chris. I think print_debug_listen_address() should have some exception checking added after the java calls. That is already done by the CHECK_false macro. It checks if an exception is occurred, and returns with false if this is the case. And

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-30 Thread David Holmes
Hi Ralf, On 30/04/2019 9:33 pm, Schmelter, Ralf wrote: Hi David, good catch. I've moved the vm->native transition back to the start of the method and instead do a native->vm transition before calling print_debug_listen_address() method. webrev:

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-30 Thread Schmelter, Ralf
Hi David, good catch. I've moved the vm->native transition back to the start of the method and instead do a native->vm transition before calling print_debug_listen_address() method. webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8223065/webrev.2/ Best regards, Ralf

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-30 Thread Schmelter, Ralf
Hi Chris. > I think print_debug_listen_address() should have some exception checking > added after the java calls. That is already done by the CHECK_false macro. It checks if an exception is occurred, and returns with false if this is the case. And depending on how the dcmd was called, this

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-30 Thread David Holmes
Responding to Chris's question below ... On 30/04/2019 3:58 am, Chris Plummer wrote: Hi Ralf, I think print_debug_listen_address() should have some exception checking added after the java calls. I'm a little unsure why you modified DebugOnCmdStartDCmd to use print_debug_listen_address(),

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-29 Thread Chris Plummer
Hi Ralf, I think print_debug_listen_address() should have some exception checking added after the java calls. I'm a little unsure why you modified DebugOnCmdStartDCmd to use print_debug_listen_address(), but still have a fallback to print the specified transport and address. If anything I

RE: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-29 Thread Schmelter, Ralf
Thanks for the review. I've update the webrev to use explicit NULL checks: https://bugs.openjdk.java.net/browse/JDK-8223065 And I now use the pointer to the first byte in the result to split the property value, since I might need the calculate the pointer past the last character (if the prop

Re: RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-29 Thread Gary Adams
In diagnosticCommand.cpp you'll want to use "res != 0" on lines 1084 and 1086 to avoid compiler warnings about ambiguous conversions to boolean. 1082 // The result should be a byte array or null 1083 typeArrayOop res = (typeArrayOop) result.get_jobject(); 1084 assert(!res ||

RFR 8223065: Add jcmd to get the listen address of the debugger

2019-04-29 Thread Schmelter, Ralf
Please review the patch which adds a jcmd to get the actual address the debugging backend is listening on. The this value was stored in the agent property sun.jdwp.listenerAddress and currently only used by the ProcessAttachingConnector. Additionally, the listen address is now displayed by the