RFR: 8263771: Refactor javaClasses initialization code to isolate dumping code

David Holmes dholmes at openjdk.java.net
Thu Mar 18 23:38:40 UTC 2021


On Thu, 18 Mar 2021 21:29:01 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> There is code in javaClasses that has a regular path and a CDS dump path. The latter is executed by the VMThread and can never throw exceptions, while the former can. If we refactor this we can simplify the exception management code. 
>> 
>> Testing: 
>>  - runtime/cds locally
>>  - tiers 1-3
>> 
>> Thanks,
>> David
>
> src/hotspot/share/classfile/javaClasses.cpp line 830:
> 
>> 828: #ifdef ASSERT
>> 829: inline static void assert_valid_fd(fieldDescriptor* fd) {
>> 830:   assert(fd->has_initial_value(), "caller should have checked this");
> 
> I think it's better to renamed to `assert_valid_static_string_field` to be more specific.

Yes - agreed.

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

PR: https://git.openjdk.java.net/jdk/pull/3066


More information about the hotspot-runtime-dev mailing list