RFR: 8275259: Add support for Java level DCmd

2021-10-13 Thread Denghui Dong
I proposed to extend DCmd to allow Java developers to customize their own diagnostic commands last week. At present, I have implemented a preliminary version. In the current implementation, I provided some simple APIs in the Java layer (under sun.management.cmd) for defining and registering com

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-13 Thread David Holmes
On Thu, 14 Oct 2021 05:42:09 GMT, Denghui Dong wrote: > In the current implementation, I provided some simple APIs in the Java layer > (under sun.management.cmd) An API that is expected to be used by application code can't go in the unsupported/internal-use-only sun.management namespace. This

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-13 Thread Denghui Dong
On Thu, 14 Oct 2021 06:17:13 GMT, David Holmes wrote: > > In the current implementation, I provided some simple APIs in the Java > > layer (under sun.management.cmd) > > An API that is expected to be used by application code can't go in the > unsupported/internal-use-only sun.management namesp

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-13 Thread David Holmes
On 14/10/2021 4:32 pm, Denghui Dong wrote: On Thu, 14 Oct 2021 06:17:13 GMT, David Holmes wrote: In the current implementation, I provided some simple APIs in the Java layer (under sun.management.cmd) An API that is expected to be used by application code can't go in the unsupported/intern

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Denghui Dong
On Thu, 14 Oct 2021 06:43:20 GMT, David Holmes wrote: > I'm not sure exactly where this API would need to go. IIUC jcmd doesn't exist at the Java level it is just a tool, so introducing an API to interact with it seems problematic to me. IMO, `jcmd` is a client of `dcmd`, the user also can use

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread David Holmes
On 14/10/2021 5:14 pm, Denghui Dong wrote: On Thu, 14 Oct 2021 06:43:20 GMT, David Holmes wrote: I'm not sure exactly where this API would need to go. IIUC jcmd doesn't exist at the Java level it is just a tool, so introducing an API to interact with it seems problematic to me. IMO, `jcmd` i

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Denghui Dong
On Thu, 14 Oct 2021 07:40:20 GMT, David Holmes wrote: > Ah right - so you're really looking at extending the capabilities of the > DiagnosticCommandMBean to add a way to register a Java diagnostic command. Yes, but we could not add registration API to DiagnosticCommandMBean directly. There are

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Thomas Stuefe
On Thu, 14 Oct 2021 05:42:09 GMT, Denghui Dong wrote: > I proposed to extend DCmd to allow Java developers to customize their own > diagnostic commands last week. > > At present, I have implemented a preliminary version. > > In the current implementation, I provided some simple APIs in the Jav

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Erik Gahlin
On Thu, 14 Oct 2021 05:42:09 GMT, Denghui Dong wrote: > I proposed to extend DCmd to allow Java developers to customize their own > diagnostic commands last week. > > At present, I have implemented a preliminary version. > > In the current implementation, I provided some simple APIs in the Jav

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Denghui Dong
On Thu, 14 Oct 2021 05:42:09 GMT, Denghui Dong wrote: > I proposed to extend DCmd to allow Java developers to customize their own > diagnostic commands last week. > > At present, I have implemented a preliminary version. > > In the current implementation, I provided some simple APIs in the Jav

Re: RFR: 8275259: Add support for Java level DCmd

2021-10-14 Thread Thomas Stuefe
On Fri, 15 Oct 2021 01:54:16 GMT, Denghui Dong wrote: > Hi Thomas, > > > Hi, > > Interesting proposal. I have some questions. > > > > * Will hanging java user code block the attach listener thread? If yes, how > > would you solve that? > > In my current implementation, I use a simple timeout

Re: RFR: 8275259: Add support for Java level DCmd

2021-11-09 Thread Chris Plummer
On 10/14/21 12:38 AM, David Holmes wrote: On 14/10/2021 5:14 pm, Denghui Dong wrote: On Thu, 14 Oct 2021 06:43:20 GMT, David Holmes wrote: I'm not sure exactly where this API would need to go. IIUC jcmd doesn't exist at the Java level it is just a tool, so introducing an API to interact wit

Re: RFR: 8275259: Add support for Java level DCmd

2021-11-09 Thread Ioi Lam
On 11/9/21 2:07 PM, Chris Plummer wrote: On 10/14/21 12:38 AM, David Holmes wrote: On 14/10/2021 5:14 pm, Denghui Dong wrote: On Thu, 14 Oct 2021 06:43:20 GMT, David Holmes wrote: I'm not sure exactly where this API would need to go. IIUC jcmd doesn't exist at the Java level it is just

Re: RFR: 8275259: Add support for Java level DCmd [v2]

2021-10-15 Thread Denghui Dong
> I proposed to extend DCmd to allow Java developers to customize their own > diagnostic commands last week. > > At present, I have implemented a preliminary version. > > In the current implementation, I provided some simple APIs in the Java layer > (under sun.management.cmd) for defining and r

Re: RFR: 8275259: Add support for Java level DCmd [v2]

2021-10-24 Thread Denghui Dong
On Fri, 15 Oct 2021 10:58:29 GMT, Denghui Dong wrote: >> I proposed to extend DCmd to allow Java developers to customize their own >> diagnostic commands last week. >> >> At present, I have implemented a preliminary version. >> >> In the current implementation, I provided some simple APIs in t

Re: RFR: 8275259: Add support for Java level DCmd [v2]

2021-10-25 Thread Thomas Stuefe
On Fri, 15 Oct 2021 10:58:29 GMT, Denghui Dong wrote: >> I proposed to extend DCmd to allow Java developers to customize their own >> diagnostic commands last week. >> >> At present, I have implemented a preliminary version. >> >> In the current implementation, I provided some simple APIs in t

Re: RFR: 8275259: Add support for Java level DCmd [v2]

2021-10-25 Thread Denghui Dong
On Mon, 25 Oct 2021 07:17:37 GMT, Thomas Stuefe wrote: > Hi Denghui, > > as I wrote before, I am neutral on this. But I agree with @egahlin that this > seems to be more on JEP level. A PR is not the right first step for this, and > I am afraid you won't build much consensus here. Maybe discuss

Re: RFR: 8275259: Add support for Java level DCmd [v2]

2021-11-09 Thread Denghui Dong
On Fri, 15 Oct 2021 10:58:29 GMT, Denghui Dong wrote: >> (RFC: >> https://mail.openjdk.java.net/pipermail/serviceability-dev/2021-October/039796.html) >> >> I proposed to extend DCmd to allow Java developers to customize their own >> diagnostic commands last week. >> >> At present, I have imp