RFR(S):8252629:jmap histo should accept "parallel" option without any specified value(Internet mail)

linzang(臧琳) linzang at tencent.com
Wed Sep 2 00:31:10 UTC 2020


Dear David, 
	Thanks for your comments!
	At present the parallal processing (with default parallel number) of jmap -histo can be used with either "jmap -histo" or "jmap -histo:parallel=0". IMHO it is more intuitive for user to use "jmap -histo:parallel" to get same result. So I think it is better to accept "parallel" rather than just printing error message.
               However I am not very sure with the necessity of this change, it looks like an optimizaion of usage for me,  but the error printing can also be treated as an expected behavior as you mentioned. so I made the webrev and expect to get some comments. 
               If it is not an issue, may be I can just close the issue.

BRs,
Lin

On 2020/9/2, 7:52 AM, "David Holmes" <david.holmes at oracle.com> wrote:

    Hi Lin,

    On 1/09/2020 7:06 pm, linzang(臧琳) wrote:
    > Hi All,
    > 
    >       Please help review this small change about jmap -histo:parallel
    > 
    >       Bug: https://bugs.openjdk.java.net/browse/JDK-8252629
    > 
    >       webrev: http://cr.openjdk.java.net/~lzang/8252629/webrev.00/
    > 
    >       The problem is that "jmap -histo:parallel" command prompt error 
    > message "Fail: invalid option: 'parallel'.". Because "parallel=<N>" 
    > option is supported by specification, and "parallel=0" is defined as the 
    > default behavior. it is better to make "jmap -histo:parallel" behave 
    > same as the "jmap -histo:parallel=0". Please see description in the bug 
    > for more details.

    I don't agree that this is desirable. Is there any precedent for 
    accepting a flag this way and have it mean "use the default"? To me this 
    is a user error indicating that they don't understand what the parallel 
    flag means.

    David
    -----

    >       Moreover, does a CSR required for this issue? IMHO, it may not be 
    > necessary as specification already mention "parallel=0" is the default 
    > behavior. But it doesn't describe the exact behavior of "parallel 
    > without any specified value", may I ask your opinion about the CSR?
    > 
    > 
    > BRs,
    > 
    > Lin
    > 
    > 




More information about the serviceability-dev mailing list