On Tue, 16 Aug 2022 06:31:41 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed copyright and whitespaces > > src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 2455: > >> 2453: if (cache->is_vfinal()) { >> 2454: callee = cache->f2_as_vfinal_method(); >> 2455: if (REWRITE_BYTECODES && !UseSharedSpaces && >> !Arguments::is_dumping_archive()) { > > As we discussed with @tstuefe in another thread, the use of `UseSharedSpaces` > needs the explicit `#include` of `globals.hpp`. When running with dynamic dump (`-XX:ArchiveClassesAtExit=foo.jsa`), `UseSharedSpaces` is true, so it's possible for a method to be rewritten here, and later dumped into the CDS archive). I think we should remove `!UseSharedSpaces`. I'll try to write a test case for it. If I understand correctly, even if `cache->is_vfinal()` is true at dump time, it's not guarantee to be true at run time (we might load a different version of the class that contains the target method). > test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java > line 108: > >> 106: removeDefaultArchives(java_home_dst, "zero"); >> 107: removeDefaultArchives(java_home_dst, "server"); >> 108: removeDefaultArchives(java_home_dst, "zero"); > > What is the point of doing "zero" part twice? Fixed. It should be "client". ------------- PR: https://git.openjdk.org/jdk/pull/9869