JDK-8138651 : -XX:DisableIntrinsic matches intrinsics overly eagerly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-09-30
  • Updated: 2015-11-20
  • Resolved: 2015-10-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b92Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Description
DisableIntrinsic filtering code looks for the vmIntrinsic name in the comma-separated list:

  ccstr disable_intr = NULL;
  if ((DisableIntrinsic[0] != '\0' && strstr(DisableIntrinsic, vmIntrinsics::name_at(id)) != NULL) ||
      (!compilation_context.is_null() &&
       CompilerOracle::has_option_value(compilation_context, "DisableIntrinsic", disable_intr) &&
       strstr(disable_intr, vmIntrinsics::name_at(id)) != NULL)
  ) {
    tty->print_cr("Disabling intrinsic %s by DisableIntrinsic", vmIntrinsics::name_at(id));
    return true;
  }

Which means that supplying -XX:DisableIntrinsic=_copyOfRange matches *both* _copyOf and _copyOfRange intrinsics. I think the code should actually look for the vmIntrinsic name to be followed with a comma or \0. It gets much worse when you are trying to disable some new intrinsic, e.g. _getCharStringU, and (Unsafe::)_getChar gets disabled along. 

Makes performance work more tedious than it should nominally be.
Comments
Hi Aleksey, thanks for spotting that issue and reporting it to us! I hope me or some other member of the compiler team can take care of it soon.
01-10-2015

Zoltan, knowing that you have touched this code (but this particular chunk is not yours, as it migrated from C2, I think, and it's quite old), initially assigned to you.
30-09-2015