RFR(XS) 8234196 [TESTBUG] DynamicArchiveRelocationTest.java missing "ArchiveRelocationMode == 1 ...."

Ioi Lam ioi.lam at oracle.com
Thu Nov 14 21:53:38 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8234196
http://cr.openjdk.java.net/~iklam/jdk14/8234196-missing-relocation-mode-log.v01/

To ensure that archive relocation has happened, the test checks for the 
log message "ArchiveRelocationMode == 1: always map archive(s) at an 
alternative address". However, in debug builds, this message occurs ONLY 
if the archive has been successfully mapped at the desired location 
(after which the JVM will unmap the archive, and remap it at an 
alternative location). See

http://hg.openjdk.java.net/jdk/jdk/file/b987ea528c21/src/hotspot/share/memory/filemap.cpp#l1397

In this particular test run, the archive failed to be mapped at the 
designed location (this is quite common on Windows), so we never execute 
the line at filemap.cpp:1397. Hence the expected message was not printed.

Anyway, the test cases already checks for the following messages:

         "runtime archive relocation start";
         "runtime archive relocation done"

so the check for "ArchiveRelocationMode == 1: ..." is redundant and can 
be removed.

Thanks
- Ioi


More information about the hotspot-runtime-dev mailing list