com.ibm.dtfj.analyzer.helpers
Class OneImageThread

java.lang.Object
  extended by TranslatableAnalyzer
      extended by com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
          extended by com.ibm.dtfj.analyzer.helpers.OneImageThread
All Implemented Interfaces:
IAnalyzerBase, IReport, IWrapper

public class OneImageThread
extends SimpleAnalyzerBean

Print and extract basic information about one DTFJ ImageThread object
Keep track of the association between ImageThreads and JavaThreads.


Constructor Summary
OneImageThread()
          Null constructor for use as JavaBean
 
Method Summary
 OneJavaThread getAssociatedJavaThread()
           
 com.ibm.dtfj.image.ImageThread getImageThread()
           
static OneImageThread getInstance(IAnalyzerContext context, com.ibm.dtfj.image.ImageThread parent)
          Find the OneImageThread bean instance associated with a given parent ImageThread (create it if necessary)
 long getRegisterValue(java.lang.String regName)
          Get the current value of a register
 OneImageSection getStackSection()
           
 long getTopOfStack()
           
 void printBasicInfo(IAnalysisReport out)
          Print the basic information for this ImageThread, as a segment of a report
 void printRegisterInfo(IAnalysisReport out)
          Print the registers information for this ImageThread, as a segment of a report
 void printStackAreaInfo(IAnalysisReport out)
          Print the stack area information for this ImageThread, as a segment of a report
 void printStackFramesInfo(IAnalysisReport out, int maxFrames)
          Print the stack frames information for this ImageThread, as a segment of a report
 IAnalysisReport produceReport()
          Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.
 void setAssociatedJavaThread(OneJavaThread associatedJavaThread)
           
 void setParent(java.lang.Object parent)
          Set the parent ImageThread underlying this analyzer bean.
 
Methods inherited from class com.ibm.dtfj.analyzer.base.SimpleAnalyzerBean
allocateReport, allocateReportOptions, allocateSecondaryReport, getCachingPriority, getCategories, getContext, getIdentityString, getInstance, getLogger, getLongDescription, getName, getNextValidObject, getParent, getReportExtensionHelper, getResourceBundleName, getShortDescription, getVersion, isPrimaryAnalyzer, printEmbeddedReport, printEmbeddedReport, printEmbeddedReportWithOptions, printEmbeddedReportWithOptions, printReportInfoHeader, recordInternalExceptionStatic, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneImageThread

public OneImageThread()
Null constructor for use as JavaBean

Method Detail

getInstance

public static OneImageThread getInstance(IAnalyzerContext context,
                                         com.ibm.dtfj.image.ImageThread parent)
Find the OneImageThread bean instance associated with a given parent ImageThread (create it if necessary)

Parameters:
context - the AnalyzerContext in which to locate this bean instance
parent - the parent ImageThread underlying this analyzer bean
Returns:
the desired OneImageThread analyzer bean

setParent

public void setParent(java.lang.Object parent)
Set the parent ImageThread underlying this analyzer bean.

Specified by:
setParent in interface IWrapper
Overrides:
setParent in class SimpleAnalyzerBean
Parameters:
parent - The parent object to set. Must be of type ImageThread. compatible with the type of analyzer bean that receives it
See Also:
IWrapper.setParent(java.lang.Object)

getAssociatedJavaThread

public OneJavaThread getAssociatedJavaThread()
                                      throws com.ibm.dtfj.image.DataUnavailable
Returns:
Returns the associatedJavaThread.
Throws:
com.ibm.dtfj.image.DataUnavailable

setAssociatedJavaThread

public void setAssociatedJavaThread(OneJavaThread associatedJavaThread)
Parameters:
associatedJavaThread - The associatedJavaThread to set.

printBasicInfo

public void printBasicInfo(IAnalysisReport out)
Print the basic information for this ImageThread, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output

printStackAreaInfo

public void printStackAreaInfo(IAnalysisReport out)
Print the stack area information for this ImageThread, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output

printStackFramesInfo

public void printStackFramesInfo(IAnalysisReport out,
                                 int maxFrames)
Print the stack frames information for this ImageThread, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output
maxFrames - maximum number of frames to include in the report

getRegisterValue

public long getRegisterValue(java.lang.String regName)
                      throws com.ibm.dtfj.image.DTFJException
Get the current value of a register

Parameters:
regName - the name of the register
Returns:
the register's value
Throws:
com.ibm.dtfj.image.DTFJException - if an error was encountered while extracting this information from the dump

printRegisterInfo

public void printRegisterInfo(IAnalysisReport out)
Print the registers information for this ImageThread, as a segment of a report

Parameters:
out - a AnalysisReport object to which to write the output

produceReport

public IAnalysisReport produceReport()
Description copied from interface: IReport
Generate a report which will be encapsulated in the IAnalysisReport object for later use by some formatter.

Specified by:
produceReport in interface IReport
Overrides:
produceReport in class SimpleAnalyzerBean
Returns:
- the generic report object which will be given to some formatter
See Also:
IReport.produceReport()

getTopOfStack

public long getTopOfStack()
                   throws com.ibm.dtfj.image.DTFJException
Returns:
the current address of the top of the stack for this thread
Throws:
com.ibm.dtfj.image.DTFJException

getStackSection

public OneImageSection getStackSection()
                                throws com.ibm.dtfj.image.DTFJException
Returns:
the single stack section associated with this thread, as a OneImageSection object
Throws:
com.ibm.dtfj.image.DTFJException

getImageThread

public com.ibm.dtfj.image.ImageThread getImageThread()
Returns:
the ImageThread associated with this OneImageThread analyzer


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.