APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvm.hotspot.runtime.amd64

public Class AMD64CurrentFrameGuess

extends Object
Class Inheritance
Imports
sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.debugger.amd64.*, sun.jvm.hotspot.code.*, sun.jvm.hotspot.interpreter.*, sun.jvm.hotspot.oops.*, sun.jvm.hotspot.runtime.*, sun.jvm.hotspot.runtime.amd64.*, sun.jvm.hotspot.types.*, sun.jvm.hotspot.utilities.*

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.

Field Summary

Modifier and TypeField and Description
private AMD64ThreadContext
private static final boolean
private Address
private Address
private Address
private JavaThread

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean
public Address
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
public boolean
run(long regionInBytesToSearch)

Returns false if not able to find a frame within a reasonable range.

private void
private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private AMD64ThreadContext context
DEBUGback to summary
private static final boolean DEBUG
fpFoundback to summary
private Address fpFound
pcFoundback to summary
private Address pcFound
spFoundback to summary
private Address spFound
threadback to summary
private JavaThread thread

Constructor Detail

AMD64CurrentFrameGuessback to summary
public AMD64CurrentFrameGuess(AMD64ThreadContext context, JavaThread thread)

Method Detail

checkLastJavaSPback to summary
private boolean checkLastJavaSP()
getFPback to summary
public Address getFP()
getPCback to summary
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

getSPback to summary
public Address getSP()
runback to summary
public boolean run(long regionInBytesToSearch)

Returns false if not able to find a frame within a reasonable range.

setValuesback to summary
private void setValues(Address sp, Address fp, Address pc)
validateInterpreterFrameback to summary
private boolean validateInterpreterFrame(Address sp, Address fp, Address pc)