org.mmtk.vm
Class TraceInterface

java.lang.Object
  extended by org.mmtk.vm.TraceInterface
Direct Known Subclasses:
TraceInterface

public abstract class TraceInterface
extends Object

Class that supports scanning Objects or Arrays for references during tracing, handling those references, and computing death times


Constructor Summary
TraceInterface()
           
 
Method Summary
abstract  Offset adjustSlotOffset(boolean isScalar, ObjectReference src, Address slot)
          This adjusts the offset into an object to reflect what it would look like if the fields were laid out in memory space immediately after the object pointer.
abstract  boolean gcEnabled()
          Returns true if the VM is ready for a garbage collection.
abstract  Address getBootImageLink()
           
abstract  Word getDeathTime(ObjectReference ref)
           
abstract  int getHeaderEndOffset()
           
abstract  int getHeaderSize()
           
abstract  ObjectReference getLink(ObjectReference ref)
           
abstract  Word getOID()
           
abstract  Word getOID(ObjectReference ref)
           
abstract  void setDeathTime(ObjectReference ref, Word time_)
           
abstract  void setLink(ObjectReference ref, ObjectReference link)
           
abstract  void setOID(Word oid)
           
abstract  Address skipOwnFramesAndDump(ObjectReference typeRef)
          This skips over the frames added by the tracing algorithm, outputs information identifying the method the containts the "new" call triggering the allocation, and returns the address of the first non-trace, non-alloc stack frame.
abstract  void updateDeathTime(ObjectReference obj)
          Update an object's death time.
abstract  void updateTime(Word time_)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceInterface

public TraceInterface()
Method Detail

gcEnabled

public abstract boolean gcEnabled()
Returns true if the VM is ready for a garbage collection.

Returns:
true if the VM is ready for GC, false otherwise.

adjustSlotOffset

public abstract Offset adjustSlotOffset(boolean isScalar,
                                        ObjectReference src,
                                        Address slot)
This adjusts the offset into an object to reflect what it would look like if the fields were laid out in memory space immediately after the object pointer.

Parameters:
isScalar - If this is a pointer store to a scalar object
src - The address of the source object
slot - The address within src into which the update will be stored
Returns:
The easy to understand offset of the slot

skipOwnFramesAndDump

public abstract Address skipOwnFramesAndDump(ObjectReference typeRef)
This skips over the frames added by the tracing algorithm, outputs information identifying the method the containts the "new" call triggering the allocation, and returns the address of the first non-trace, non-alloc stack frame.

Parameters:
typeRef - The type reference (tib) of the object just allocated
Returns:
The frame pointer address for the method that allocated the object

updateDeathTime

public abstract void updateDeathTime(ObjectReference obj)
Update an object's death time.

Parameters:
obj - the object

setDeathTime

public abstract void setDeathTime(ObjectReference ref,
                                  Word time_)

setLink

public abstract void setLink(ObjectReference ref,
                             ObjectReference link)

updateTime

public abstract void updateTime(Word time_)

getOID

public abstract Word getOID(ObjectReference ref)

getDeathTime

public abstract Word getDeathTime(ObjectReference ref)

getLink

public abstract ObjectReference getLink(ObjectReference ref)

getBootImageLink

public abstract Address getBootImageLink()

getOID

public abstract Word getOID()

setOID

public abstract void setOID(Word oid)

getHeaderSize

public abstract int getHeaderSize()

getHeaderEndOffset

public abstract int getHeaderEndOffset()