On Fri, 14 Aug 2026 22:52:04 GMT, Mat Carter <[email protected]> wrote:
>> Improve startup and warmup time by making optimized native code for an >> application instantly available when the HotSpot Java Virtual Machine >> starts. Achieve this by compiling application code to native code in a >> training run, storing the native code in the [AOT >> cache](https://openjdk.org/jeps/483#Description) for use in subsequent >> production runs. >> >> More details in the [JEP](https://openjdk.org/jeps/544). >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/hotspot/share/code/nmethod.cpp line 2455: > >> 2453: } >> 2454: >> 2455: if (_immutable_data != blob_end() && >> !AOTCodeCache::is_address_in_aot_cache((address)_oop_maps)) { > > Why not just check if _immutable_data is in the AOT Code Cache? Or is it > that _oop_maps can be in the cache and _immutable_data may not [but not the > reverse case]. Basically when _oop_maps is in the cache we can't free > _immutable_data even if its not in the cache? Good question. I don't know. This change was done 10 months ago during big merge from mainline into premain. Code could be different at that time. Both _oop_maps and _immutable_data are located in AOT code cache for AOT code now. We should check _immutable_data here. I will make change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30778#discussion_r3793076767
