RFR: 8267075: jcmd VM.cds should print directory of the output files
Yumin Qi
minqi at openjdk.java.net
Wed Jun 23 22:17:27 UTC 2021
On Wed, 23 Jun 2021 20:40:22 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Hi, Please review the simple change for jcmd VM.cds to print directory of output file.
>> The printout will print out absolute file path, also a test scenario added.
>>
>> Tests: tier1,tier2,tier3,tier4
>>
>> Thanks
>> Yumin
>
> test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java line 53:
>
>> 51: String stdText = output.getOutput();
>> 52: if (stdText.contains(promtStdout) &&
>> 53: stdText.contains(promtStderr)) {
>
> What if either `promtStdout` or `promtStderr` is not found in stdout, should a RuntimeException be thrown as well?
The exception could be other type and without containing those two strings. It should leave to the default processing. Only with those two messaged found, we check if the file with a absolute path.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4576
More information about the hotspot-runtime-dev
mailing list