-
Bug
-
Resolution: Fixed
-
P2
-
repo-valhalla
Vector[] covariance; // Vector is an interface
....
covariance = new Ref1[size]; // Ref1 is concrete class implementing Vector.
(So we have static type array of interface, but runtime type is array of exact type).
Method 'covariance':
public Object covariance() {
Vector[] values = covariance;
for (int i = 0; i < size; i++) {
values[i] = new Ref1(i);
}
return values;
}
Method 'covariance' can't be compiled due to large set on uncommon trap events:
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953875' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='868' compile_kind='osr' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953924' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954875' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='868' compile_kind='osr' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954948' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130955375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
======
Note: The issue doesn't depend on options +-EnableValhalla, but doesn't exist in the main jdk repo (only in valhalla-repo).
=====
Reproduce:
Benchmark: 'org.openjdk.bench.valhalla.baseline.arrays.Set1.covariance' from Valhalla microbenchmarks.
(and many many others with the similar behavior).
....
covariance = new Ref1[size]; // Ref1 is concrete class implementing Vector.
(So we have static type array of interface, but runtime type is array of exact type).
Method 'covariance':
public Object covariance() {
Vector[] values = covariance;
for (int i = 0; i < size; i++) {
values[i] = new Ref1(i);
}
return values;
}
Method 'covariance' can't be compiled due to large set on uncommon trap events:
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953875' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='868' compile_kind='osr' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130953924' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954875' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='868' compile_kind='osr' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130954948' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
<uncommon_trap thread='2522' reason='none' action='none' debug_id='0' compile_id='869' compiler='c2' level='4' count='202' stamp='9.514'>
<jvms bci='24' method='oracle.micro.set.Set1 covariance ()Ljava/lang/Object;' bytes='33' count='119752' backedge_count='130955375' iicount='119752' decompiles='202' none_traps='202' profile_predicate_traps='4' predicate_traps='1'/>
</uncommon_trap>
======
Note: The issue doesn't depend on options +-EnableValhalla, but doesn't exist in the main jdk repo (only in valhalla-repo).
=====
Reproduce:
Benchmark: 'org.openjdk.bench.valhalla.baseline.arrays.Set1.covariance' from Valhalla microbenchmarks.
(and many many others with the similar behavior).
- relates to
-
JDK-8234572 [lworld] aaload/aastore profiling
- Resolved