[crac] RFR: 8376959: [CRaC] Turn simengine into shared library [v8]

Radim Vansa rvansa at openjdk.org
Mon Feb 9 21:58:46 UTC 2026


On Fri, 6 Feb 2026 08:12:09 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>> 
>>  - Merge branch 'crac' into simengine_separation
>>  - Fix tests on non-Linux
>>  - Try fix Windows build
>>  - Address review comments
>>  - Fixup
>>  - Fixups
>>  - Implement static build & other platforms
>>  - JDK-8376959: [CRaC] Turn simengine into shared library
>
> src/java.base/share/native/libcrcommon/crcommon.hpp line 74:
> 
>> 72:   void *image_constraints;
>> 73:   void *image_score;
>> 74: };
> 
> Since we want to use the C layer a more conventional way seems to be to move this definition to `crcommon.cpp` (it can even become a normal class with a constructor/destructor) and use composition instead of inheritance (engine classes would be `struct crlib_conf`s themselves, `bool init_conf(conf_t* conf, ...)` would become `conf_t* create_conf(...)`). These fields are not used directly anywhere except `crcommon.cpp` anyway.
> 
> Otherwise the fields can at least become their actual types to remove the casts in `crcommon.cpp`.

I want to keep the full extension definition in crcommon and with that I won't avoid either inheritance, or globally set function: in crcommon I need to be able to translate `crlib_conf_t` into `conf_t`. Which way would you prefer?

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

PR Review Comment: https://git.openjdk.org/crac/pull/289#discussion_r2774582847


More information about the crac-dev mailing list