RFR: 8280682: Refactor AOT code source validation checks [v2]

Calvin Cheung ccheung at openjdk.org
Fri Feb 14 19:21:32 UTC 2025


On Tue, 11 Feb 2025 05:25:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   @iklam and @ashu-mehra comment
>
> src/hotspot/share/cds/aotCodeSource.cpp line 133:
> 
>> 131: 
>> 132: // AllCodeSourceStreams is used to iterate over all the code sources that
>> 133: // are available to the application from -Xbootclasspath, -classpath and --module-path
> 
> Consider adding this comment:
> 
> // When creating an AOT cache, we store the contents from AllCodeSourceStreams
> // into an array of AOTCodeSources. See AOTCodeSourceConfig::dumptime_init_helper().
> // When loading the AOT cache in a production run, we compare the contents of the
> // stored AOTCodeSources against the current AllCodeSourceStreams to determine whether
> // the AOT cache is compatible with the current JVM. See AOTCodeSourceConfig::validate().

Added the comment.

> src/hotspot/share/cds/aotCodeSource.hpp line 126:
> 
>> 124: // Non-existent entries are recored during AOTCache creation. Those non-existent entries
>> 125: // must not exist during runtime.
>> 126: //
> 
> Typos:
> - "subjected to AOTCodeSourceConfig::validate()" -- the function has two parameters, but we can omit them in this comment
> - "validation is performed on *the* AOTCodeSources"
> - "during AOTCache creation *are* the same"
> - "on-existent entries are *recorded*"

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23476#discussion_r1956613731
PR Review Comment: https://git.openjdk.org/jdk/pull/23476#discussion_r1956613683


More information about the hotspot-dev mailing list