RFR(M): 8135068: Extract methodmatchers from CompilerOracle

Nils Eliasson nils.eliasson at oracle.com
Fri Sep 11 12:51:36 UTC 2015


Hi,

The analysis in 8081387 was wrong, and I have closed it. I would still 
like to remove the should_exclude call from the inlining code and hide 
the functionality inside CompilerOracle::should_inline. Simplifying the 
CompilerControl interface to the compiler is a preparation for further 
changes. (The inlining code only needs to know if it is supposed to 
override with force inline/no inline - it doesn't need to know what 
command was used).

I have implemented your other remarks.

Also included some new changes:
- Moved MethodMatcherTest to test/compiler/oracle where the other 
CompilerOracle tests reside.
- Updated CompilerConfigFileWarningTest - output is error message should 
be identical to what was supplied in command file.
- Updated CheckCompileCommandOption test - mixing the two styles of 
method patterns are not allowed anymore.

webrev:
hotspot: http://cr.openjdk.java.net/~neliasso/8135068/webrev.05/
jdk: http://cr.openjdk.java.net/~neliasso/8135068/webrev_jdk.02/

Thank for having a look,
//Nils


On 2015-09-11 06:59, Vladimir Kozlov wrote:
> compileBroker.cpp: should be CompileCommand (no 'r'):
>
> "excluded by CompilerCommand"
>
> matchesMethodMatcher name does not sound good, you don't need to 
> include Class name into name. Simple use matchMethod().
>
> I agree with Roland that you should not include 8081387 in these changes.
>
> Thanks,
> Vladimir
>
> On 9/7/15 5:58 AM, Nils Eliasson wrote:
>> Hi all,
>>
>> This is another preparatory change for compiler control. This change
>> extracts the code for matching methods in CompilerOracle into a separate
>> class that has subtypes for basic and typed matchers. (In a future
>> change an additional subtype will show up.) The code is mostly the same
>> but include fixes for error handling and pattern validation.
>>
>> A whitebox method and a test (MethodMatcherTest.java) is supplied for
>> ensuring correctness of the rewrite.
>>
>> This change fixes the following bugs:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8074095 - Method validation in
>> CompileCommand
>> https://bugs.openjdk.java.net/browse/JDK-8081387 - C2 does not respect
>> exclu de command for inlining
>> https://bugs.openjdk.java.net/browse/JDK-8069173 - CompileCommand needs
>> better test coverage
>>
>> This patch may have to applied on top of
>> http://cr.openjdk.java.net/~neliasso/8135067 Preparatory refactorings
>> for compiler control to apply cleanly.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8135068
>> webrev hotspot: http://c.openjdk.java.net/~neliasso/8135068/webrev.04
>> webrev jdk: http://c.openjdk.java.net/~neliasso/8135068/webrev_jdk.01
>>
>> The change passes regular hotspot testing.
>>
>> Thanks,
>> Nils



More information about the hotspot-compiler-dev mailing list