ART: No JIT for native MethodHandle/VarHandle methods

MethodHandle invocations can record JIT samples. This can lead to
transitioning the JNI stubs for MH.invoke and MH.invokeExact from
AOT compiled to JIT compiled and then to generic when there is a JIT
code cache collection. The transitions and differences in stack frame
representations can cause a crash during stack walking.

This only affects native invocations of handles which we do to raise
UnsuppportedOperationExceptions when invoked reflectively. Not
performance critical and not likely to be exercised in real code, but
leads to flakes in gcstress testing of 956-methodhandles.

Bug: 78151261
Test: art/test/run-test --host --64 --compact-dex-level fast --jit --no-relocate --pic-test 956
Test: art/test.py --host -r -t 716
Change-Id: Ie3fdbcfc4decb12814290bcce8d25c5e2fde87f1
6 files changed