Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Memory.Manager
Class GCMapIterator  view GCMapIterator download GCMapIterator.java

java.lang.Object
  extended byMemory.Manager.GCMapIterator

public abstract class GCMapIterator
extends java.lang.Object

Version:
$Id: GCMapIterator.java,v 1.2 2003/05/12 10:05:19 joewhaley Exp $

Field Summary
 Memory.StackAddress framePtr
          address of stackframe currently being scanned
 Memory.StackAddress[] registerLocations
          address where each gpr register was saved by previously scanned stackframe(s)
 Scheduler.jq_Thread thread
          thread whose stack is currently being scanned
 
Constructor Summary
GCMapIterator()
           
 
Method Summary
abstract  void cleanupPointers()
          Iteration is complete, release any internal data structures including locks acquired during setupIterator for jsr maps.
abstract  Memory.StackAddress getNextReferenceAddress()
          Get address of next object reference held by current stackframe.
abstract  Memory.StackAddress getNextReturnAddressAddress()
          Get address of next JSR return address held by current stackframe.
abstract  int getType()
          Get the type of this iterator (BASELINE, OPT, etc.).
 void newStackWalk(Scheduler.jq_Thread thread)
          Prepare to scan a thread's stack and saved registers for object references.
abstract  void reset()
          Prepare to re-iterate on same stackframe, and to switch between "reference" iteration and "JSR return address" iteration.
abstract  void setupIterator(Clazz.jq_CompiledCode compiledMethod, int instructionOffset, Memory.StackAddress framePtr)
          Prepare to iterate over object references and JSR return addresses held by a stackframe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thread

public Scheduler.jq_Thread thread
thread whose stack is currently being scanned


framePtr

public Memory.StackAddress framePtr
address of stackframe currently being scanned


registerLocations

public Memory.StackAddress[] registerLocations
address where each gpr register was saved by previously scanned stackframe(s)

Constructor Detail

GCMapIterator

public GCMapIterator()
Method Detail

newStackWalk

public void newStackWalk(Scheduler.jq_Thread thread)
Prepare to scan a thread's stack and saved registers for object references.


setupIterator

public abstract void setupIterator(Clazz.jq_CompiledCode compiledMethod,
                                   int instructionOffset,
                                   Memory.StackAddress framePtr)
Prepare to iterate over object references and JSR return addresses held by a stackframe.


getNextReferenceAddress

public abstract Memory.StackAddress getNextReferenceAddress()
Get address of next object reference held by current stackframe. Returns zero when there are no more references to report.

Side effect: registerLocations[] updated at end of iteration. TODO: registerLocations[] update should be done via separately called method instead of as side effect.


getNextReturnAddressAddress

public abstract Memory.StackAddress getNextReturnAddressAddress()
Get address of next JSR return address held by current stackframe.


reset

public abstract void reset()
Prepare to re-iterate on same stackframe, and to switch between "reference" iteration and "JSR return address" iteration.


cleanupPointers

public abstract void cleanupPointers()
Iteration is complete, release any internal data structures including locks acquired during setupIterator for jsr maps.


getType

public abstract int getType()
Get the type of this iterator (BASELINE, OPT, etc.). Called from GCMapIteratorGroup to select which iterator to use for a stackframe. The possible types are specified in jq_CompiledCode.