JDK-2147849 : Allow different styles of java object fields allocation
  • Type: Backport
  • Backport of: JDK-6523674
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2007-03-21
  • Updated: 2010-04-03
  • Resolved: 2007-03-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 Other
6u2 b01Fixed hs10Fixed
Description
See main file description.

Comments
SUGGESTED FIX Webrev: http://prt-web.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/1.6/update2/baseline/2007/20070324150138.kvn.6523674_6u2/workspace/webrevs/webrev-2007.03.24/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. I added flags: -XX:FieldsAllocationStyle={0|1} 0 - type based allocation with oops first (default, same as before) 1 - type based allocation with oops last -XX:+CompactFields allocate fields in the gap before a double/long field (if available). Off by default. -XX:+PrintCompactFieldsSavings - print number of saved/wasted words in class due to different fields allocation style with base FieldsAllocationStyle=1. Debug flag, off by default. -XX:+AggressiveOpts sets: -XX:FieldsAllocationStyle=1 -XX:+CompactFields.
26-03-2007

EVALUATION Different styles of java object nonstatic fields allocation provide performance improvement.
22-03-2007