runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[ARM/Linux] Rejitting is not supported on ARM

Open papaslavik opened this issue 10 years ago • 7 comments

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

papaslavik avatar Jun 09 '16 08:06 papaslavik

@Dmitri-Botcharnikov

papaslavik avatar Jun 09 '16 08:06 papaslavik

@jkotas @BruceForstall @dotnet/jit-contrib

RussKeldorph avatar Jun 09 '16 15:06 RussKeldorph

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.

jkotas avatar Jun 09 '16 16:06 jkotas

cc @kspawa

noahfalk avatar Jun 09 '16 21:06 noahfalk

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?

papaslavik avatar Jun 10 '16 06:06 papaslavik

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.

jkotas avatar Jun 10 '16 06:06 jkotas

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...

papaslavik avatar Jun 10 '16 07:06 papaslavik