RFR: 8377777: Improve logging when rejecting assets from the AOT archive [v4]
María Arias de Reyna Domínguez
duke at openjdk.org
Wed Feb 18 09:36:58 UTC 2026
On Wed, 18 Feb 2026 07:19:41 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> María Arias de Reyna Domínguez has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Adding index on CPPool for better tracking
>> - Adding explanation for indy and fields
>
> src/hotspot/share/oops/cpCache.cpp line 467:
>
>> 465: rfi->is_resolved(Bytecodes::_getstatic) || rfi->is_resolved(Bytecodes::_putstatic) ? " *** static" : "");
>> 466: }
>> 467: }
>
> The two log lines basically print out the same info, except that one of them prints "reverted" and the other prints "...resolution is not deterministic".
>
> I would suggest changing the format (of all the messages touched by this PR) to something like:
>
>
> archived xxxxx
> reverted xxxxxx (resolution not deterministic)
> reverted xxxxxx (non-builtin loader)
>
>
> The messages should be concise to reduce log file size.
>
> The C++ code can generally look like this:
>
>
> log.print("%s ...... %s",
> (archived ? "archived" : "reverted"),
> ......
> (archived ? "" : "(resolution not deterministic)");
The problem with that approach is that either I drag the reason from `ConstantPoolCache::can_archive_resolved_method` forwards to the log lines of `ConstantPoolCache::remove_resolved_method_entries_if_non_deterministic`...
Or I only log the archived ones there (in https://github.com/openjdk/jdk/pull/29690/changes#diff-7c80246775ae7b0e39ab029c1f9782d2dcf9e2e53a3d2d37c01080fae5d0a6deR501 ) and write the reject reason on `ConstantPoolCache::can_archive_resolved_method` which may mean in the future someone forget to add a rejection log message for new cases.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29690#discussion_r2821294938
More information about the hotspot-dev
mailing list