RFR(S): 8012322 : Tiered: CompilationPolicy::can_be_compiled(CompLevel_all) mistakenly return false

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Apr 18 11:02:44 PDT 2013


Changes are good. My only complain is variables naming:

!             final int n = TIERED_STOP_AT_LEVEL + 1;
+             for (int i = 1; i < n; ++i) {

+         for (int j = 1, n = TIERED_STOP_AT_LEVEL + 1; j < n; ++j) {

For the code to be "clear and self-documented" :) use some meaningful 
names instead of 'i', 'j' and 'n'.

Thanks,
Vladimir

On 4/18/13 10:30 AM, Igor Ignatyev wrote:
> Hi all,
>
> Please review the patch.
>
> Problem:
> if method is 'not_compilable' in C1 or C2,
> 'CompilationPolicy::can_be_compiled' will return false for
> 'CompLevel_all' even it is compilable in another level
>
> Fix:
> 1. added explicit comp_level to all calls of
> CompilationPolicy::can_be_compiled
> 2. in CompilationPolicy::can_be_compiled()
>    - added assert for checking legality of comp_level
>    - changed logic for comp_level == CompLevel_all
>
> Testing:
> JPRT 'compiler/whitebox'
>
> webrev: http://cr.openjdk.java.net/~iignatyev/8012322/webrev.00/
> jbs: https://jbs.oracle.com/bugs/browse/JDK-8012322


More information about the hotspot-compiler-dev mailing list