RFR: 8344140: Refactor the discovery of AOT cache artifacts [v4]

Ashutosh Mehra asmehra at openjdk.org
Wed Jan 8 22:39:45 UTC 2025


On Wed, 8 Jan 2025 02:43:56 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> This is a clean up after the initial integration for [JEP 483](https://bugs.openjdk.org/browse/JDK-8315737)
>> 
>> - Merged 3 loops into 1 for discovering the classes and oops that should be stored in the AOT cache. About 250 lines of code are deleted.
>> - Added comments in aotArtifactFinder.hpp to describe the logic, which is much simpler than before.
>> - Enum classes are no longer unconditionally AOT-initialized -- an Enum class is AOT-initialized only if we find an archived oop of this type.
>> 
>> Note to reviewers:
>> 
>> One consequence of this refactoring is that archived oops are now discovered (by heapShared.cpp) before the metadata are copied (by ArchiveBuilder). There are some functions that depend on the old order (metadata were copied before oop discovery), so I had to shuffle them around. Examples are `Modules::check_archived_module_oop()`, or the new code in `Klass::remove_java_mirror()`.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   @ashu-mehra comments

Marked as reviewed by asmehra (Committer).

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

PR Review: https://git.openjdk.org/jdk/pull/22291#pullrequestreview-2538415364


More information about the hotspot-dev mailing list