RFR: 8310831: Some methods are missing from CDS regenerated JLI holder class
Ioi Lam
iklam at openjdk.org
Fri Jun 27 18:06:38 UTC 2025
On Fri, 27 Jun 2025 04:22:01 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
> Per the [suggested fix](https://bugs.openjdk.org/browse/JDK-8310831?focusedId=14788065&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14788065), this patch doesn't issue a warning if the missing method is the constructor of a holder class.
>
> Sanity tier1 tested.
>
> Manually tested by building the `images` with the `-Xlog:cds=off` removed from the `GenerateLinkOptData.gmk` and with build logging enabled (`LOG=info`).
Changes requested by iklam (Reviewer).
src/hotspot/share/cds/regeneratedClasses.cpp line 60:
> 58: if (regen_m == nullptr) {
> 59: ResourceMark rm;
> 60: if (strstr(orig_m->external_name(), "$Holder.<init>") == nullptr) {
I think it's better to use `orig_m->name() != vmSymbols::object_initializer_name()`.
Also, we should have a comment that explain why it's OK for `<init>` to be skipped.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26011#pullrequestreview-2967455441
PR Review Comment: https://git.openjdk.org/jdk/pull/26011#discussion_r2172578550
More information about the hotspot-runtime-dev
mailing list