RFR(S/M): 8150646: Add support for blocking compiles through whitebox API

Nils Eliasson nils.eliasson at oracle.com
Fri Feb 26 08:26:14 UTC 2016

Hi Volker,

On 2016-02-26 09:10, Volker Simonis wrote:
> Hi Nils,
> I have a similar fix like yours in my patch queue since a while but
> never managed to send it out for review.
> I took a little different approach and made -XX:BackgroundCompilation
> applicable on a per-method base trough the compiler directive
> framework. Can you please give me a few hours to prepare a clean
> webrev of my solution so we can discuss it as well. Maybe we can even
> merge both solutions?
Excellent - I have such a directives patch too! I look forward to see 
how we can merge them.

I think both variants are need - directives is the full solution, and 
this patch for having a simple way to submit single compiles in tests 
that already use Whitebox.

> And I think there's two things you can improve even if we completely
> stay with your solution. You will have to change
> AdvancedThresholdPolicy::is_stale() to prevent methods from beeing
> removed from the compile queue because they are considered stale. This
> happens quite often if you register a method for compilation but don't
> call it anymore.
I have run into the is_stale-problems too, but not for compiles that are 
blocked on. I'll take a second look at that.
> And you can change AdvancedThresholdPolicy::compare_methods() to
> prefer blocking compiles over non-blocking ones. This will decrease
> the time you'll have to wait for a blocking compilation and decreases
> the chance that a method registered for a blocking compile gets stale
> (see previous section).
That is a good idea. I'll look into it.

Best regards,
Nils Eliasson

> Regards,
> Volker
> On Thu, Feb 25, 2016 at 4:01 PM, Nils Eliasson <nils.eliasson at oracle.com> wrote:
>> Hi,
>> Please review this change that adds support for blocking compiles in the
>> whitebox API. This enables simpler less time consuming tests.
>> Motivation:
>> * -XX:-BackgroundCompilation is a global flag and can be time consuming
>> * Blocking compiles removes the need for waiting on the compile queue to
>> complete
>> * Compiles put in the queue may be evicted if the queue grows to big -
>> causing indeterminism in the test
>> * Less VM-flags allows for more tests in the same VM
>> Testing:
>> Posting a separate RFR for test fix that uses this change. They will be
>> pushed at the same time.
>> RFE: https://bugs.openjdk.java.net/browse/JDK-8150646
>> JDK rev: http://cr.openjdk.java.net/~neliasso/8150646/webrev_jdk.01/
>> Hotspot rev: http://cr.openjdk.java.net/~neliasso/8150646/webrev.02/
>> Best regards,
>> Nils Eliasson

More information about the hotspot-compiler-dev mailing list