Issue Details (XML | Word | Printable)

Key: RVM-587
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Ian Rogers
Reporter: David Grove
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
RVM

IdentityHashMaps in the bootimage

Created: 10/Jul/08 04:09 PM   Updated: 01/Aug/08 03:26 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0

Time Tracking:
Not Specified


 Description  « Hide
It's very likely that IdentityHashMaps can't be safely carried over from bootimage writing time to run time because our default hash code won't be the same as the host JVM. Verify this, and if it is the case, we need to rework code to avoid use of any such hash maps in the bootimage.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Grove added a comment - 10/Jul/08 07:06 PM
If there are a small number, of "well-known' identity hash maps in the bootimage, then we could make them work by having the bootimage writer traverse their keys and build up a sidetable of objects in identity hash maps right before it starts writing objects to the bootimage. We would then write these objects in "HASHED_AND_MOVED" form with the hashcode being the system hashcode given them by the host JVM.

It's fragile and restricts the object model options for Jikes RVM to those that can represent the 32 bit hash from the host JVM, but if we must have identity hash maps in the bootimage it's probably the only way to make that actually work.


Ian Rogers added a comment - 11/Jul/08 08:19 AM
I think the right way to tackle this is to add a boot image interface that computes the identity hash code. In the boot image writer and object model we can then either throw errors, use the HASHED_AND_MOVED trick or possibly pre-allocate the object. The result of the boot image writer identity hash code method would be the identity hash code. We can call the interface in the RVM identity hash maps, and its also extensible if we need the identity hash code in other places in the future.

Ian Rogers added a comment - 14/Jul/08 01:17 PM
Patch committed in r14714, extra support will be necessary for non address based hash codes as used in GC spy's object model.