History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RVM-415
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Steve Blackburn
Votes: 0
Watchers: 0
Operations

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

Better abstraction and identification of helpers

Created: 24/Mar/08 08:26 PM   Updated: 11/Apr/08 09:46 AM
Component/s: Runtime
Affects Version/s: None
Fix Version/s: 1000

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
One of the advantages of Java-in-Java design is that we have zero impedance between user code and system helper code (for example write barriers and allocation sequences). By contrast, in C-based VMs such "helper" code is explicitly defined and often hand-crafted in asm or IR. A long time ago Jikes RVM's write barriers were written in asm.

Currently we do not identify such code at all. It would be good to explicitly identify all helpers. Moreover, it could be very useful to have well defined interfaces to them so that the concrete implementations of the helpers could vary.

For example, we could have org.mmtk.helpers as a package with abstract definitions of the helper methods (following the abstract factory pattern perhaps, as used by org.mmtk.vm). Various concrete instances of the helpers could then be instantiated. In our case, we'd use a Java instance, but if someone were interested, they could write an asm instance or perhaps an IR instance. It may require some refactoring to get these helper methods suitably lean (imagine writing them in asm).

This project will help improve encapsulation and modularity. It will particularly help more clearly delineate user mode and system mode execution, which is pretty clear in a regular VM but rather opaque in Jikes RVM.

It would be great if we could get this done before 3.0.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ian Rogers - 25/Mar/08 06:49 AM
I quite agree. I have some code that moves the entry into lock code into a helper, the helper can then go to either a thin or fat lock implementation of locks. This ties in with refactoring the object model as I wanted to be able to test either lock implementation and the overhead it places on the object layout. Using helpers in this way may create a burden for the opt compiler for which RVM-148 may be important.