Re: Extend jcmd to java application level

2021-10-08 Thread Denghui Dong
Hi, Thank you for the response. I just made a PoC for this extension: https://github.com/D-D-H/jdk/commit/eb2a13b7ba8bd3e6d048491c8a579b179d2cef0d Here is the test code: ``` import sun.management.cmd.CmdMeta; import sun.management.cmd.Command; import sun.management.cmd.ParamMeta; import sun.man

Re: RFR: 8274620: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out

2021-10-08 Thread Chris Plummer
On Fri, 8 Oct 2021 21:05:16 GMT, Chris Plummer wrote: >> This PR fix the issue of JDK-8274620 >> (resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out) >> The root cause is that `BufferedOutputStream` should be used when writting >> data to file. > > Marked as reviewed by

Re: RFR: 8274620: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out

2021-10-08 Thread Lin Zang
On Fri, 8 Oct 2021 21:05:16 GMT, Chris Plummer wrote: >> This PR fix the issue of JDK-8274620 >> (resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out) >> The root cause is that `BufferedOutputStream` should be used when writting >> data to file. > > Marked as reviewed by

Re: RFR: 8274620: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out

2021-10-08 Thread Chris Plummer
On Fri, 8 Oct 2021 06:00:03 GMT, Lin Zang wrote: > This PR fix the issue of JDK-8274620 > (resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java is timing out) > The root cause is that `BufferedOutputStream` should be used when writting > data to file. Marked as reviewed by cjplummer (

Re: RFR: 8274898: Cleanup usages of StringBuffer in jdk tools modules

2021-10-08 Thread Сергей Цыпанов
On Thu, 9 Sep 2021 06:53:13 GMT, Andrey Turbanov wrote: > StringBuffer is a legacy synchronized class. StringBuilder is a direct > replacement to StringBuffer which generally have better performance src/jdk.jpackage/share/classes/jdk/jpackage/internal/Log.java line 117: > 115: > 116:

Re: RFR: 8274004: Change 'nonleaf' rank name [v2]

2021-10-08 Thread Coleen Phillimore
On Fri, 8 Oct 2021 00:48:05 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix overlap error message printing and add a test. > > test/hotspot/gtest/runtime/test_mutex.cpp line 292: > >> 29

Re: RFR: 8274004: Change 'nonleaf' rank name [v2]

2021-10-08 Thread Coleen Phillimore
On Thu, 7 Oct 2021 15:28:31 GMT, Coleen Phillimore wrote: >> Also fixes: 8273956: Add checking for rank values >> >> This change does 3 things. I could separate them but this has all been >> tested together and most of the change is mechanical. The first is a simple >> rename of nonleaf => s

Integrated: 8274004: Change 'nonleaf' rank name

2021-10-08 Thread Coleen Phillimore
On Wed, 6 Oct 2021 23:27:17 GMT, Coleen Phillimore wrote: > Also fixes: 8273956: Add checking for rank values > > This change does 3 things. I could separate them but this has all been > tested together and most of the change is mechanical. The first is a simple > rename of nonleaf => safepo

Re: RFR: 8274004: Change 'nonleaf' rank name [v3]

2021-10-08 Thread Coleen Phillimore
> Also fixes: 8273956: Add checking for rank values > > This change does 3 things. I could separate them but this has all been > tested together and most of the change is mechanical. The first is a simple > rename of nonleaf => safepoint. The second change is to add the enum class > Rank whi

Re: Extend jcmd to java application level

2021-10-08 Thread Erik Gahlin
To make an application command usable, it must provide metadata (name and description of the command, its options’ data types, units, default values, if it is mandatory etc.) and error handling. This will make the API surface larger and trickier to get right. (Not a full overlap, but we are thi

Re: Extend jcmd to java application level

2021-10-08 Thread Yi Yang
That seems an ideal solution. I think there are some potential code consolidation work further. With this change, some existing C++ JFR Jcmd structure definitions(and other Jcmd commands) in VM level can also be lifted to Java level because they simply forward request to Java level by JavaCalls

Re: Extend jcmd to java application level

2021-10-08 Thread Ioi Lam
On 10/7/21 6:25 PM, David Holmes wrote: Hi Denghui, On 7/10/2021 11:58 pm, Denghui Dong wrote: Hi team, The `jcmd` command can be used to call some built-in diagnostic commands in vm. Can we consider extending it to the java layer like perf data, so that Java developers can customize t