[crac] RFR: Support passing extra options in CREngine [v3]
Anton Kozlov
akozlov at openjdk.org
Tue Jun 13 14:14:14 UTC 2023
On Tue, 13 Jun 2023 13:46:20 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> In addition to `-XX:CREngine=program` this adds support to `-XX:CREngine=program,--key,value,--anotherkey` that translates into invoking `program --key value --anotherkey`. Commas support escaping with a backslash.
>>
>> This generic parameters support is utilized in `criuengine` that accepts `--verbosity` and `--log-file` options and relays them to `criu`.
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>
> fixup
The update made the code simpler, thank you!
LGTM with small nits.
src/hotspot/os/linux/os_linux.cpp line 440:
> 438: static const char* _crengine = NULL;
> 439: static char* _crengine_arg_str = NULL;
> 440: static const char* _crengine_args[32] = { NULL, NULL, NULL };
Should it be really 3 NULLs?
src/hotspot/os/linux/os_linux.cpp line 5945:
> 5943: static void add_crengine_arg(const char *arg) {
> 5944: for (size_t i = 2; i < ARRAY_SIZE(_crengine_args) - 1; ++i) {
> 5945: if (_crengine_args[i] == NULL) {
The last empty position can be remembered along _crengine_args
-------------
PR Review: https://git.openjdk.org/crac/pull/63#pullrequestreview-1471893822
PR Review Comment: https://git.openjdk.org/crac/pull/63#discussion_r1228177212
PR Review Comment: https://git.openjdk.org/crac/pull/63#discussion_r1228185011
More information about the crac-dev
mailing list