JDK-8067014 : LinearScan::is_sorted significantly slows down fastdebug builds' performance
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7u80,8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-12-09
  • Updated: 2016-03-15
  • Resolved: 2016-02-19
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 b110Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
LinearScan::is_sorted used in fastdebug builds in order to verify that C1's interval's array is actually sorted and that both sorted and unsorted arrays contain same elements:

http://hg.openjdk.java.net/jdk8u/hs-dev/hotspot/file/9c8dbbd8694a/src/share/vm/c1/c1_LinearScan.cpp#l1451

Unfortunately it significantly slows down performance of fastdebug builds and regularly cause test failures due to exceeded timeouts.

I believe that performance of that method could be enhanced.
For instance, we can just check that lengths of both sorted and unsorted arrays are same and then just run over elements of unsorted array and check that each interval is presented in sorted array.
Binary search could be used to find interval from unsorted array in sorted array then.

Comments
RFR thread: 1st email : http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2015-March/017281.html last : http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2015-August/018634.html
25-01-2016

I've played with is_sorted implementation and its performance could be actually improved.
02-03-2015

ILW=slow performance;fastdebug c1;none=MMH=P3
10-12-2014