RFR(S/M): 8150646: Add support for blocking compiles through whitebox API
Nils Eliasson
nils.eliasson at oracle.com
Fri Mar 11 13:49:32 UTC 2016
Hi,
I got a failure during testing and had to fix that. The additional
change is very small.
Problem:
Running embedded server profiles with -XX:+AggressiveOpts can cause
compilations to trigger (many Integers in the cache...) before the
compile broker is initialized.
What this code at the start of compile_method doesn't tell you - is that
the NULL check guards from compile requests before the compilation_init
is called.
// lock, make sure that the compilation
1052 // isn't prohibited in a straightforward way.
1053 AbstractCompiler *comp = CompileBroker::compiler(comp_level);
1054 if (comp == NULL || !comp->can_compile_method(method) ||
1055 compilation_is_prohibited(method, osr_bci, comp_level)) {
1056 return NULL;
1057 }
The compile_method wrapper we introduced used
"CompileBroker::compiler(comp_level)" but didn't guard for NULL.
Solution:
There was already a check on CompileBroker::_initalized in the code - a
bit late though - so it was never executed. I hoisted it from
compile_method_base to the beginning of compile_method and check the
check comp==NULL check to an assert.
All new changes in CompileBroker.cpp:
Webrev: http://cr.openjdk.java.net/~neliasso/8150646/webrev.07
Regards,
Nils Eliasson
On 2016-02-25 16:01, Nils Eliasson 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160311/9434597b/attachment.html>
More information about the hotspot-compiler-dev
mailing list