On Tue, 30 Jun 2026 13:31:41 GMT, Andrew Dinn <[email protected]> wrote:
>> Looking further into this I cannot see anywhere where these stubs are being >> used? So, it's hard to say what is really needed here. >> >> However, it looks to me as if these two return value stubs ought to be >> generated as `SharedRuntime` stubs. That is where we generate stubs that >> need their own blob and also require an associated oop map. The right time >> to generate looks like under the call to >> `SharedRuntime::generate_initial_stubs()`. That will occur just after >> generation of the `StubGen initial` stubs i.e. before generating any of the >> gc/jfr/continuation stubs or interpreter and before calling >> `AOTCodeCache::init3()`. > > The callee should be passed a stub id which it can use to look up the stub > name provided in the stub declaration. That also means there is no need to > provide a true/false argument as the callee can pick its generation strategy > based on stub id. > > The target address can also be determined in the callee according to whatever > the stub id is. If you want to pass it here then you will need to add asserts > in the callee that the method is the correct target for the stub id. > > Also, in order for save and restore of the generated stubs to work the two > target addresses need to be added to the AOT address table as external > addresses in AOTCodeCache::init_extrs(). > > Since generation of these subs is dependent on the setting of > `InlineTypeReturnedAsFields` the resulting dependence of any generated AOT > code cache's contents on this flag setting needs to be recorded by adding an > entry for `InlineTypeReturnedAsFields` to macro > `AOTCODECACHE_CONFIGS_GENERIC_DO` in file `aotCodecache.hpp.` > > If any help is required to implement these changes I am happy to provide > guidance. Thanks for your review @adinn and sorry for the delay. Roland offered to take a look and I think he'll address your comments with [JDK-8387661](https://bugs.openjdk.org/browse/JDK-8387661). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31122#discussion_r3512679275
