RFR: 8271303: jcmd VM.cds {static, dynamic}_dump should print more info [v2]

Yumin Qi minqi at openjdk.java.net
Fri Sep 24 18:17:56 UTC 2021


On Fri, 24 Sep 2021 06:47:31 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed absolute path issue
>
> src/java.base/share/classes/jdk/internal/misc/CDS.java line 337:
> 
>> 335:         }
>> 336:         // Everyting goes well, print out the file name.
>> 337:         String archiveFilePath = cwd + File.separator + archiveFileName;
> 
> `archiveFileName` may already be a absolute path (e.g., "/tmp/foo.jar"), so this will print out something like /app/cwd//tmp/foo.jar, which will be incorrect. It should be changed to
> 
> 
> String archiveFilePath = new File(archiveFileName).getAbsolutePath();

Yes, it could be a absolute path already.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5643


More information about the hotspot-runtime-dev mailing list