Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6516101
Votes 0
Synopsis checkcast operations should be profiled to improve code which uses generics
Category hotspot:compiler2
Reported Against
Release Fixed hs10(b08), 6u4(b03) (Bug ID:2171911) , 7(b08) (Bug ID:2176850)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6561457
Submit Date 22-JAN-2007
Description
Generic types in the Java language are represented by their bounds in the JVM, and mismatches are made up by dynamic casts.  These casts are invisible to the programmer but frequent in the bytecodes.  We need better optimization of these casts in order to get top performance from generic Java code.

We can do much better if we treat casts like call sites, when profiling and optimizing.  If we profile receiver types at casts, we will be able to hoist profiled type information up to the place where a new value is pulled from a generic List or Set, which is typically much earlier than a call site that uses the new value.  If the profile is monomorphic (which is a typical case, especially in hot code), then all subsequent type checks will fold away, and all calls will be devirtualized.  We have benchmarks where this happens in hot code.
Posted Date : 2007-01-22 22:38:28.0
Work Around
N/A
Evaluation
yes, done
*** (#1 of 1): [ UNSAVED ]   xxxxx@xxxxx  
Posted Date : 2007-02-15 23:46:20.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang