RFR: 8261090: Store old classfiles in static CDS archive [v2]
Calvin Cheung
ccheung at openjdk.java.net
Tue Apr 20 00:01:58 UTC 2021
On Mon, 19 Apr 2021 17:02:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>>
>> - review comments from @iklam
>> - Merge branch 'master' into 8261090-store-old-classfiles
>> - use is_written() instead of is_old_class() in constantPool.cpp
>> - remove extraneous whitespace
>> - Merge branch 'master' into 8261090-store-old-classfiles
>> - add comments and some code simplification
>> - 8261090: Store old classfiles in static CDS archive
>
> src/hotspot/share/classfile/verifier.cpp line 289:
>
>> 287: // which the verifier can't understand.
>> 288: // Bytecodes for shared old classes can be verified because they have
>> 289: // not been rewritten.
>
> Maybe put the above 2 lines under line 290, and change "can be" to "should be"?
>
>
> // However, bytecodes for shared old classes should be verified because they have
> // not been rewritten.
Fixed.
> src/hotspot/share/interpreter/rewriter.cpp line 572:
>
>> 570: void Rewriter::rewrite(InstanceKlass* klass, TRAPS) {
>> 571: if (klass->is_shared()) {
>> 572: assert(!klass->is_rewritten(), "rewritten shared classes cannot be rewritten again");
>
> Also add
>
>
> assert(MetaspaceShared::is_old_class(klass), "only shared old classes aren't rewritten");
Fixed.
> src/hotspot/share/oops/constantPool.cpp line 142:
>
>> 140: it->push(&_tags, MetaspaceClosure::_writable);
>> 141: if (!pool_holder()->is_rewritten()) {
>> 142: it->push(&_cache, MetaspaceClosure::_writable);
>
> This shouldn't be necessary. All ConstantPoolCache are allocated in RW space by default.
Fixed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3479
More information about the hotspot-runtime-dev
mailing list