RFR: 8290981: Enable CDS for zero builds [v4]
Aleksey Shipilev
shade at openjdk.org
Tue Aug 16 16:52:18 UTC 2022
On Tue, 16 Aug 2022 16:30:40 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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).
I thought if we run with dynamic dump, then `Arguments::is_dumping_archive()` is `false`, and we don't rewrite.
Anyway, if you remove `!UseSharedSpaces` here, like you did in PR update, then this happens during Linux x86_64 Zero build:
$ CONF=linux-x86_64-zero-fastdebug make images
...
Creating support/classlist.jar
-------------
PR: https://git.openjdk.org/jdk/pull/9869
More information about the build-dev
mailing list