[jdk17] RFR: 8268522: InstanceKlass::can_be_verified_at_dumptime() returns opposite value [v2]

Ioi Lam iklam at openjdk.java.net
Sat Jun 12 01:14:52 UTC 2021


On Fri, 11 Jun 2021 18:13:20 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Please review this small patch:
>> 
>> - correct the return value of `InstanceKlass::can_be_verified_at_dumptime()` to match the function's name;
>> - modify the call sites accordingly.
>> 
>> - [x] mach5 tiers 1,2,3
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change _is_shared_old_klass to _verified_at_dump_time

Just one request for change. The rest looks good to me.

src/hotspot/share/oops/instanceKlass.cpp line 2407:

> 2405:   if (!can_be_verified_at_dumptime()) {
> 2406:     // Clear the _verified_at_dump_time bit.
> 2407:     clear_verified_at_dump_time();

I think it's better to change this to 


if (can_be_verified_at_dumptime()) {
  // Remember this so we can avoid walking the hierarchy at runtime.
  set_verified_at_dump_time();


and do not set this bit inside `Klass::Klass()`. This way, all the code that changes this bit are kept in a single place.

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

Changes requested by iklam (Reviewer).

PR: https://git.openjdk.java.net/jdk17/pull/31


More information about the hotspot-runtime-dev mailing list