[crac] RFR: 8350845: [CRaC] Support C/R engines in form of a library
Radim Vansa
rvansa at openjdk.org
Thu Feb 27 21:00:14 UTC 2025
On Thu, 27 Feb 2025 13:47:29 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
> How about adding an optional extension for this, not sure how exactly to call it (`description`, `identification`, `docs`, `reflection`...), but it would have methods `const char *id_string()` and `const char *configure_description_string()`. Maybe also `const char *extensions_description_string()` but I'm still not sure why this would be needed.
Yes, extension is a sensible way to do this if you don't want to make this obligatory part of the interface.
> Then, if JVM detects that the user asked for help, it could construct the help message by combining the output of these two methods to get roughly the same as in the PR description. To make it so that it does not require `CRaCCheckpointTo`/`CRaCRestoreFrom` to work we can either make `CRaCEngineOptions=help` a special case for which the VM will check regardless of the CRaC-enabling options being set, or we can add another VM option `CRaCPrintEngineHelpAndExit` (or `PrintCRaCEngineHelpAndExit`, `PrintCRaCEngineInfoAndExit`?) that would load the engine, print the help message and exit VM analogous to how `PrintSharedArchiveAndExit` from CDS behaves.
I would stick to `CRaCEngineOptions` (and a special case). Bonus points if you don't require any other option.
-------------
PR Comment: https://git.openjdk.org/crac/pull/207#issuecomment-2689096791
More information about the crac-dev
mailing list