RFR 8039080: "jinfo server_id at host" fails with "Invalid process identifier"

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Thu Apr 3 12:20:05 UTC 2014


On 3.4.2014 14:08, Dmitry Samersoff wrote:
> Jaroslav,
>
> Command line processing is still not clean, e.g. you check for -help in
> three different places.
>
> If you go to refactor this code rather than provide a minimal fix,
> it might be better to create a separate inner class that do all command
> line processing and provide couple of flags like should_sa(),
> should_help(), should_attach() etc.

Yes, I know :(

My first approach was exactly like that. But I was rewriting the command 
line parser from scratch for at least the 3rd time for "tools" alone :( 
And the change was going to be rather big - more of a complete rewrite 
than a fix.

May be this is a time to replace all various incarnations of command 
line processing with a unified command line parsing API? But this would 
obviously go beyond the simple fix of one missed argument combination.

-JB-


>
> -Dmitry
>
>
>
> On 2014-04-03 15:27, Jaroslav Bachorik wrote:
>> Please, review the following fix in "jinfo" launcher.
>>
>> Issue : https://bugs.openjdk.java.net/browse/JDK-8039080
>> Webrev: http://cr.openjdk.java.net/~jbachorik/8039080/webrev.00
>>
>> When switching "jinfo" to utilize diagnostic commands when possible a
>> combination of launcher arguments was omitted causing "jinfo" fail to
>> execute the default action (-flags & -sysproperties) against a remote SA
>> debug server.
>>
>> The patch fixes this omission. Additionally it contains a refactoring to
>> make the launcher argument parsing testable via a unit test (testng).
>> Also, a new test is provided covering the possible argument combinations.
>>
>> Thanks,
>>
>> -JB-
>
>



More information about the serviceability-dev mailing list