Nice catch, Michael! @HotSpotIntrinsicCandidate starts to pay off :-)

So, if a native method w/ an intrinsic is instrumented, it won't be intrinsified anymore. Looking into the code, it looks like it worked that way from the very beginning.

Filed an RFE:
  https://bugs.openjdk.java.net/browse/JDK-8176771

Do you have any problems when the JVM issues such warnings?

Best regards,
Vladimir Ivanov

On 3/14/17 06:24, Michael Rasmussen wrote:
Hi

If you set a native prefix using SetNativeMethodPrefix, in order to wrap
native methods. If those methods are annotated with
@HotSpotIntrinsicCandidate
you get a warning when running.

For instance for Thread::isInterrupted:
Compiler intrinsic is defined for method
[java.lang.Thread.isInterrupted(Z)Z], but the method is not annotated
with
@HotSpotIntrinsicCandidate. Method will not be inlined.
Method [java.lang.Thread.$prefix$isInterrupted(Z)Z] is annotated with
@HotSpotIntrinsicCandidate, but no compiler intrinsic is defined for the
method.

Shouldn't the native prefix be taken into account for this?

Kind regards

Michael Rasmussen
JRebel, ZeroTurnaround

Reply via email to