[crac] RFR: 8376959: [CRaC] Turn simengine into shared library [v5]
Timofei Pushkin
tpushkin at openjdk.org
Fri Feb 6 08:45:07 UTC 2026
On Tue, 3 Feb 2026 15:51:44 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> Right now `simengine` is implemented as an executable, invoked through `libcrexec` that implements the C/R API. Since the programmatic C/R API should be the main interface, any exec API is redundant; let's turn `simengine` into shared (dynamic) library implementing the API on its own.
>>
>> The `pauseengine` does not need to exist on its own; this can be only an option `pause=true` for `simengine`. The implementation is Linux only (and it is out of scope to fill in a non-Linux implementation - the `pause` option can be just excluded in non-Linux `libsimengine`).
>>
>> We expect to turn `libcrexec` + `criuengine` into `libcriuengine` in a follow up (not as part of this issue).
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review comments
src/java.base/share/native/libcrexec/crexec.cpp line 296:
> 294: auto * const conf = new(std::nothrow) CrExec();
> 295: if (conf == nullptr || !conf->is_initialized()) {
> 296: LOG("Cannot create crexec instance (insufficient memory?)");
Nitpick: both here and in simengine we know whether it was insufficient memory (`conf == nullptr`) or something else (`!conf->is_initialized()`). `!conf->is_initialized()` can also be caused by insufficient memory but that is up to `CrExec`'s constructor to log. So I believe the best way would be: `if (conf == nullptr) LOG("insufficient memory")`
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/289#discussion_r2772672222
More information about the crac-dev
mailing list