Issue Details (XML | Word | Printable)

Key: RVM-551
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

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

Experiment with object collocation

Created: 03/Jul/08 09:00 AM   Updated: 03/Jul/08 09:00 AM
Component/s: Compiler: Optimizing, MMTk
Affects Version/s: None
Fix Version/s: 1000

Time Tracking:
Not Specified


 Description  « Hide
It would be interesting to experiment with object collocation where when two object are allocated at a similar time we replace the allocation with a single collocated allocation. Consider:

String {
char[] value;
String(char[] _value) {
value = new char[_value.length];
for (int i=0; i<_value.length; i++) { value[i]=_value[i]; }
}
char charAt(int offset) { return value[offset]; }
}

if the String and char[] were collocated then we could turn charAt into:

char charAt(int offset) { if (collocated()) return load(this+offset_of_value+offset*2) return value[offset]; }

ie we've saved a load. The collocated test could be either a bit in the object header, or that the String has been allocated in the nursery (and the region between the allocation of String to the allocation of the array for value is uninterruptible). Once we have a test case like this we can experiment with MMTk, specializing on the collocated case, enforcing collocation (so the collocation test result just becomes true), etc.. We can also consider automating the transformation to collocated objects with the opt compiler.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.