On Fri, 13 Mar 2026 17:55:45 GMT, Frederic Parain <[email protected]> wrote:
> This patch removes the mandatory preloading triggered by the @NullRestricted
> annotated fields, and falls back to the speculative pre-loadings allowed by
> the LoadableDescriptors attribute.
> See the CR for more details about the rational and the new semantic of the
> @NullRestricted annotation.
>
> Tested with Mach5 tier1-4.
>
> Thank you.
I was mostly worried about tests expecting flat layouts to suddenly no longer
get flat layouts and silently continue to pass.
src/hotspot/share/classfile/classFileParser.cpp line 6386:
> 6384: set_inline_layout_info_klass(fieldinfo.index(),
> InlineKlass::cast(klass), CHECK);
> 6385: log_info(class, preload)("Preloading of class %s during
> loading of class %s "
> 6386: "(cause: field type not in
> LoadableDescriptors attribute) succeeded",
Same, even though this is existing we need a better message, like
Speculative lookup of loaded class %s during loading of class %s succeeded
src/hotspot/share/classfile/classFileParser.cpp line 6390:
> 6388: } else if (fieldinfo.field_flags().is_null_free_inline_type()) {
> 6389: if (klass == nullptr) {
> 6390: log_warning(class, preload)("After preloading of class %s
> during loading of class %s failed,"
Also this is not "preloading", this is just looking up a loaded class.
Suggestion:
log_warning(class, preload)("After lookup of loaded class %s during
loading of class %s failed,"
src/hotspot/share/classfile/classFileParser.cpp line 6395:
> 6393: name->as_C_string(),
> _class_name->as_C_string());
> 6394: } else {
> 6395: log_warning(class, preload)("After preloading of class %s
> during loading of class %s failed,"
Suggestion:
log_warning(class, preload)("After lookup of loaded class %s during
loading of class %s succeeded,"
-------------
PR Review:
https://git.openjdk.org/valhalla/pull/2228#pullrequestreview-3955285738
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2228#discussion_r2941660243
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2228#discussion_r2941649471
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2228#discussion_r2941650470