[ARM/Linux] Rejitting is not supported on ARM
According to the code below in src/vm/rejit.h the rejitting is supported only for x86 and x64 architectures. I just would like to ask if it's not supported because of some principal problem, or is it just not yet supported?
src/vm/rejit.h
if defined(X86) || defined(AMD64)
5;
else
error "Need to define size of rejit jump-stamp for this platform"
1;
endif
@Dmitri-Botcharnikov
@jkotas @BruceForstall @dotnet/jit-contrib
cc @noahfalk
it's not supported because of some principal problem
There is no principal problem.
The ReJIT feature is for pretty advanced diagnostics/profiler scenarios, e.g. collecting diagnostic data on demand from a live server without disrupting it. These scenarios have not been interesting for ARM platform so far. That's why the ReJIT feature is not implemented for it.
cc @kspawa
Thanks @jkotas we're not interested in such scenarios as for now either. But we just want to know if there's an intended way to drop some jitted function code e.g. for lack of memory related reason.
Also i noticed that just after jitting a method we have a call DoBackpatch(pMT, pDispatchingMT, FALSE); with the parameter FALSE, and in that function we still leave the pre stub entry point.
EDIT: And we backpatch it with TRUE only on the second call for the jitted method. Isn't that used at some point to drop the native jitted code for the function which are called only once?
there's an intended way to drop some jitted function code e.g. for lack of memory related reason
There is no such mechanism today.
Thanks @jkotas
By the way in the Android ART the class initializers are not compiled but interpreted, which might be not good from the performance point of view, but on the other hand they don't occupy the disk space.
Dropping the native code for the static constructors in C# would also be nice, I believe...