United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6523674 Allow different styles of java object fields allocation
JDK-6523674 : Allow different styles of java object fields allocation

Details
Type:
Enhancement
Submit Date:
2007-02-09
Status:
Resolved
Updated Date:
2010-05-22
Project Name:
JDK
Resolved Date:
2007-04-24
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs10 (b12)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
Currently HotSpot VM allocate java object fileds according to thir type
in the next order:

oops        (32-bits for LP32, 64-bits for LP64)
long/double (64-bits fileds)
int/float   (32-bits fileds)
short/char  (16-bits fileds)
byte        ( 8-bits fileds)  

The other stype could be source based.

Also we could compact fields by placeing them into gaps between fields in super class.

                                    

Comments
EVALUATION

Different styles of java object nonstatic fields allocation provide
performance improvement.
                                     
2007-02-27
SUGGESTED FIX

Webrev:                 http://prt-web.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2007/20070323140227.kvn.6523674/workspace/webrevs/webrev-2007.03.23/index.html

Solution:
These changes implement straightforward approach by allocating oops fields 
last instead of first. Added the fields compacting by allocating fields in
available gap before a double/long field.
Added missed hard-coded offset checks in JavaClasses::check_offsets().
Changed generation of several prefetch instructions. Do it only for arrays 
and do it on sparc also.
                                     
2007-03-24



Hardware and Software, Engineered to Work Together