Save This Page
Home » openjdk-7 » sun.jvm » hotspot » runtime » amd64 » [javadoc | source]
public class: AMD64CurrentFrameGuess [javadoc | source]

Should be able to be used on all amd64 platforms we support (Linux/amd64) to implement JavaThread's "currentFrameGuess()" functionality. Input is an AMD64ThreadContext; output is SP, FP, and PC for an AMD64Frame. Instantiation of the AMD64Frame is left to the caller, since we may need to subclass AMD64Frame to support signal handler frames on Unix platforms.

Algorithm is to walk up the stack within a given range (say, 512K at most) looking for a plausible PC and SP for a Java frame, also considering those coming in from the context. If we find a PC that belongs to the VM (i.e., in generated code like the interpreter or CodeCache) then we try to find an associated EBP. We repeat this until we either find a complete frame or run out of stack to look at.

 public AMD64CurrentFrameGuess(AMD64ThreadContext context,
    JavaThread thread) 
Method from sun.jvm.hotspot.runtime.amd64.AMD64CurrentFrameGuess Summary:
getFP,   getPC,   getSP,   run
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.jvm.hotspot.runtime.amd64.AMD64CurrentFrameGuess Detail:
 public Address getFP() 
 public Address getPC() 
    May be null if getting values from thread-local storage; take care to call the correct AMD64Frame constructor to recover this if necessary
 public Address getSP() 
 public boolean run(long regionInBytesToSearch) 
    Returns false if not able to find a frame within a reasonable range.