Intrinsic interactions with Deoptimization
Christian Thalinger
christian.thalinger at oracle.com
Wed May 4 19:18:21 UTC 2016
> On May 3, 2016, at 5:38 AM, Ahmed Khawaja <ahmed.khawaja at oracle.com> wrote:
>
> Greetings,
>
> I am working on a C2 intrinsic and I have a question concerning deoptimization. The calling method is being deoptimized after a certain point with the cause being unstable branches. While I understand that the calling method should be reprofiled/recompiled, it was my understanding that after an intrinsic was triggered, any calls to it (the intrinsified function) would always result in the intrinsic code running. What I am seeing is when the parent/calling method falls back to interpreter mode to re-profile, the intrinsic code is no longer being called and the Java implementation of the (called) method is being used. Can someone shine some light on the interaction between intrinsics and deoptimization? My hypothesis is that the intrinsic code that was generated is still there, but some glue code was flushed during deoptimization. The desired behavior I am pursuing is that once the method triggers intrinsification, the intrinsic should always be used. Is falling back to interpretation an all or nothing type behavior?
Intrinsification is replacing a well-known Java method with some compiler IR in the compilation unit. There is no “intrinsified function” since it never was a separate compilation unit. Once the compiled method is deoptimized you certainly fall back to the interpreter and whatever the Java byte code is you are executing.
Maybe you are mixing up intrinsics and stubs? What are you working on?
>
> Thank you,
> Ahmed Khawaja
More information about the hotspot-compiler-dev
mailing list