On Thu, 1 May 2025 00:24:07 GMT, Vladimir Kozlov <k...@openjdk.org> wrote:
>> src/hotspot/share/runtime/sharedRuntime.cpp line 2852: >> >>> 2850: entry_offset[2] = handler->get_c2i_unverified_entry() - i2c_entry; >>> 2851: entry_offset[3] = handler->get_c2i_no_clinit_check_entry() - >>> i2c_entry; >>> 2852: AOTCodeCache::store_code_blob(*adapter_blob, >>> AOTCodeEntry::Adapter, id, name, AdapterHandlerEntry::ENTRIES_COUNT, >>> entry_offset); >> >> What the intended behavior here when `AOTCodeCache::store_code_blob` fails? > > If something happened when we tried to store blob (adapter in this case) into > buffer (for example, if reserved for AOT code buffer is too small) the next > will be called: > > set_failed(); > exit_vm_on_store_failure(); > > So we either abort VM based on the flag or issue warning (as you suggested) > and continue execution. > > `set_failed()` will prevent following attempts to cache blobs and prevent > final dump any cached code into AOT cache: > > bool for_dump() const { return _for_dump && !_failed; } Maybe add an assert here? bool success = AOTCodeCache::store_code_blob(...); assert(success || !AOTCodeCache::is_dumping_adapters(), ""); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24740#discussion_r2069760236