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

Coleen Phillimore coleenp at openjdk.java.net
Thu Mar 18 11:48:39 UTC 2021


On Thu, 18 Mar 2021 06:12:18 GMT, David Holmes <dholmes 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

Looks good. One question.

src/hotspot/share/classfile/javaClasses.cpp line 897:

> 895:     if (fd->field_type() != T_OBJECT) {
> 896:       initialize_static_primitive_field(fd, mirror);
> 897:     } else {

This is a bit unnerving that there's no T_ARRAY here. Can you add an assert(!T_ARRAY, "unexpected");  Static field types cannot be T_ARRAY really?

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the hotspot-runtime-dev mailing list