RFR (S): 8067014: LinearScan::is_sorted significantly slows down fastdebug builds' performance

Filipp Zhinkin filipp.zhinkin at gmail.com
Fri Mar 6 18:24:33 UTC 2015

Hi Aleksey,

thanks for looking at it!

On Fri, Mar 6, 2015 at 2:41 PM, Aleksey Shipilev
<aleksey.shipilev at oracle.com> wrote:
> Hi Filipp,
> On 06.03.2015 14:33, Filipp Zhinkin wrote:
>> In certain cases (like -client -Xcomp) C1 compilation is very slow
>> w/ fastdebug builds. A place where we spent enormous amount of time
>> is LinearScan::is_sorted method, which simply verifies that a list
>> that should be sorted is actually sorted and that both sorted and
>> unsorted lists contains same intervals.
> Okay, what caller of is_sorted dominates? Maybe instead of optimizing
> the is_sorted itself, you need to move/relax the assert in some selected
> places?

Well, the dominating caller is LinearScan::create_unhandled_lists [1].

> That is to say I am not fond of complicating the non-product code that
> does verification without a compelling reason to do so; let's first
> figure out if we "just" do excess asserts.

That's a good point. I'll try to figure a out if an assertion is placed to be
sure that all methods called in the right sequence and if it's true, then
it may be better to use less expensive approach.


[1] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/de7ca28f8b7d/src/share/vm/c1/c1_LinearScan.cpp#l1486

> Thanks,
> -Aleksey.

More information about the hotspot-compiler-dev mailing list