RFR: 8155206: Internal VM test DirectiveParser_test is too verbose

Stefan Karlsson stefan.karlsson at oracle.com
Wed Apr 27 08:19:38 UTC 2016


Hi all,

Please review this patch to silence the DirectiveParser_test internal VM 
test.

http://cr.openjdk.java.net/~stefank/8155206/webrev.01
https://bugs.openjdk.java.net/browse/JDK-8155206

Before the patch, we got the following output when running with 
-XX:+ExecuteInternalVMTests:

...
Running test: Test_log_file_startup_truncation
Running test: Test_invalid_log_file
Running test: DirectivesParser_test
Internal error on line 1 byte 2: Directive missing required match.
   Got EOS.
   At '}'.
{}
Internal error on line 1 byte 3: Directive missing required match.
   At '}]'.
[{}]
Internal error on line 1 byte 3: Directive missing required match.
   At '},{}]'.
[{},{}]
Internal error on line 1 byte 2: Directive missing required match.
   At '},{}'.
{},{}
Syntax error on line 2 byte 3: DirectivesParser can only start with an 
array containing directive objects, or one single directive.
   At '['.
   [
     {
       match: "foo/bar.*",
       inline : "+java/util.*",
       PrintAssembly: true,
       BreakAtExecute: true,
     }
   ]
]

Value error on line 4 byte 20: The key 'PrintInlining' does not allow an 
array of values.
   At '['.
     PrintInlining: [
       true,
       false
     ],
   }
]

Warning: +LogCompilation must be set to enable compilation logging from 
directives
Warning: +LogCompilation must be set to enable compilation logging from 
directives
Value error on line 7 byte 9: Method pattern error: Missing leading 
inline type (+/-)
   At '"foo",'.
         "foo",
         "bar",
       ]
     }
   }
]

Value error on line 8 byte 9: Method pattern error: Missing leading 
inline type (+/-)
   At '"bar",'.
         "bar",
       ]
     }
   }
]

Key error on line 1 byte 7: Key 'c1' not allowed after 'c1' key.
   At 'c1:{c1:{c1:{c1:{c1:{c1:{}}}}}}}}]'.
[{c1:{c1:{c1:{c1:{c1:{c1:{c1:{}}}}}}}}]
Value error on line 5 byte 12: Key of type match needs a value of type 
string
   At 'true,'.
     match: true,
     inline: true,
     enable: true,
     c1: {
       preset: true,
     }
   }
]

Running test: Test_TempNewSymbol
Running test: VMStructs_test
...

With the patch the output is much less noisy:
...
Running test: Test_log_file_startup_truncation
Running test: Test_invalid_log_file
Running test: DirectivesParser_test
Warning:  +LogCompilation must be set to enable compilation logging from 
directives
Warning:  +LogCompilation must be set to enable compilation logging from 
directives
Running test: Test_TempNewSymbol
Running test: VMStructs_test
...

We might want to get rid of the Warning messages, but I think the 
proposed patch is a good first step.

You can turn on the old output with -XX:+VerboseInternalVMTests.

Tested with -XX:+ExecuteInternalVMTests :)

Thanks,
StefanK


More information about the hotspot-compiler-dev mailing list