RFR (smallish?) 8061611: Remove deprecated command line flags

Derek White derek.white at oracle.com
Tue Dec 16 21:33:11 UTC 2014

Hi Bengt,

On 12/16/14 3:12 PM, Derek White wrote:
> Hi Bengt,
> On 12/16/14 6:50 AM, Bengt Rutisson wrote:
>> About DiagnosticMXBean. I realize that it will not be possible to 
>> verify the "=" vs. ":=" semantics if you use the MXBean instead of 
>> parsing the PrintFlagsFinal output. But on the other hand I am not so 
>> sure this is an important distinction to test as long at the values 
>> are correct. I'm fine with parsing the output if you think this is 
>> important. The MXBean approach would be fewer lines of code though.
> O, I'll try MXBeans.

So it looks like 
ManagementFactoryHelper.getDiagnosticMXBean().getVMOption() works on the 
current VM? If so, I'd have to duplicate the option name and option 
value in two places - in  a "@run" comment and in the test verification 
code. Is this right?

      "@run main/othervm -XX:fisk=99"


    String expectedValue = "99";
    option = diagnostic.getVMOption("fisk");
    if (!expectedValue.equals(option.getValue())) {
         throw new RuntimeException("Wrong value for fisk. Expected " +
    expectedValue + " but got " + option.getValue());

I must be missing something.

  - Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20141216/8f694479/attachment.htm>

More information about the hotspot-gc-dev mailing list