[crac] RFR: RFC: -XX:CPUFeatures=0xnumber for CPU migration [v14]
Anton Kozlov
akozlov at openjdk.org
Thu Jun 8 13:33:24 UTC 2023
On Thu, 18 May 2023 13:57:09 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
>> src/hotspot/share/runtime/stubCodeGenerator.cpp line 62:
>>
>>> 60: void StubCodeDesc::thaw() {
>>> 61: assert(_frozen, "repeated thaw operation");
>>> 62: _frozen = false;
>>
>> Is it still necessary? I've tried to comment this line out, and checkpoint-restore succeded for me.
>
> I get during restore:
>
> # Internal Error (../../src/hotspot/share/runtime/stubCodeGenerator.hpp:72), pid=12265, tid=12273
> # assert(!_frozen) failed: no modifications allowed
>
> Did you really use a `*debug` build (and not `release` build)? The crash above has been generated on `slowdebug`.
Indeed, something wrong was with my setup. The complete stack trace
Stack: [0x00007f7f6eb00000,0x00007f7f6ec00000], sp=0x00007f7f6ebfbc70, free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x171395c] StubCodeMark::StubCodeMark(StubCodeGenerator*, char const*, char const*)+0x19c
V [libjvm.so+0x1923334] VM_Version_StubGenerator::generate_get_cpu_info()+0x354
V [libjvm.so+0x1921997] VM_Version::initialize_features()+0x157
V [libjvm.so+0x13cddb5] VM_Crac::verify_cpu_compatibility()+0x65
V [libjvm.so+0x13d5a3b] VM_Crac::doit()+0x4cb
V [libjvm.so+0x18eeb53] VM_Operation::evaluate()+0x213
V [libjvm.so+0x191307c] VMThread::evaluate_operation(VM_Operation*)+0x19c
V [libjvm.so+0x1913d1d] VMThread::inner_execute(VM_Operation*)+0x20d
V [libjvm.so+0x1913f55] VMThread::loop()+0xb5
V [libjvm.so+0x1914089] VMThread::run()+0xc9
V [libjvm.so+0x180e9f8] Thread::call_run()+0xf8
V [libjvm.so+0x13d04c1] thread_native_entry(Thread*)+0x101
The generate_get_cpu_info is called at https://github.com/openjdk/crac/blob/241a3465c1358e6f9bcabb03aaa211d6cd3cfaa9/src/hotspot/cpu/x86/vm_version_x86.cpp#L1898, and the stub is preserved. Can we just avoid code-generatation on repeated calls of initialize_features? And drop thaw() completely?
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/41#discussion_r1222916730
More information about the crac-dev
mailing list