gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
BaseStackTrace Class Referenceabstract

#include <profile.hh>

Inheritance diagram for BaseStackTrace:
ArmISA::StackTrace MipsISA::StackTrace PowerISA::StackTrace RiscvISA::StackTrace SparcISA::StackTrace X86ISA::StackTrace

Public Member Functions

 BaseStackTrace ()
virtual ~BaseStackTrace ()
void clear ()
bool valid () const
bool trace (ThreadContext *tc, const StaticInstPtr &inst)
const std::vector< Addr > & getstack () const
void dprintf ()
virtual bool tryGetSymbol (std::string &symbol, Addr addr, const Loader::SymbolTable *symtab)
void getSymbol (std::string &symbol, Addr addr, const Loader::SymbolTable *symtab)

Protected Member Functions

virtual void trace (ThreadContext *tc, bool is_call)=0

Protected Attributes

ThreadContexttc = nullptr
std::vector< Addrstack

Private Member Functions

void dump ()

Detailed Description

Definition at line 48 of file profile.hh.

Constructor & Destructor Documentation

◆ BaseStackTrace()

BaseStackTrace::BaseStackTrace ( )

Definition at line 62 of file profile.hh.

◆ ~BaseStackTrace()

virtual BaseStackTrace::~BaseStackTrace ( )

Definition at line 63 of file profile.hh.

Member Function Documentation

◆ clear()

void BaseStackTrace::clear ( )

Definition at line 66 of file profile.hh.

References stack, and tc.

Referenced by trace().

◆ dprintf()

void BaseStackTrace::dprintf ( )

Definition at line 89 of file profile.hh.

References DTRACE, and dump().

◆ dump()

void BaseStackTrace::dump ( )

◆ getstack()

const std::vector<Addr>& BaseStackTrace::getstack ( ) const

Definition at line 87 of file profile.hh.

References stack.

◆ getSymbol()

void BaseStackTrace::getSymbol ( std::string &  symbol,
Addr  addr,
const Loader::SymbolTable symtab 

Definition at line 102 of file profile.hh.

References addr, panic_if, and tryGetSymbol().

Referenced by dump().

◆ trace() [1/2]

virtual void BaseStackTrace::trace ( ThreadContext tc,
bool  is_call 
protectedpure virtual

◆ trace() [2/2]

bool BaseStackTrace::trace ( ThreadContext tc,
const StaticInstPtr inst 

Definition at line 75 of file profile.hh.

References clear(), StaticInst::isCall(), StaticInst::isReturn(), tc, trace(), and valid().

◆ tryGetSymbol()

bool BaseStackTrace::tryGetSymbol ( std::string &  symbol,
Addr  addr,
const Loader::SymbolTable symtab 

Definition at line 57 of file

References addr, Loader::SymbolTable::end(), and Loader::SymbolTable::find().

Referenced by getSymbol().

◆ valid()

bool BaseStackTrace::valid ( ) const

Definition at line 72 of file profile.hh.

References tc.

Referenced by trace().

Member Data Documentation

◆ stack

std::vector<Addr> BaseStackTrace::stack

Definition at line 55 of file profile.hh.

Referenced by clear(), dump(), and getstack().

◆ tc

ThreadContext* BaseStackTrace::tc = nullptr

Definition at line 54 of file profile.hh.

Referenced by clear(), dump(), trace(), and valid().

The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:21 for gem5 by doxygen 1.8.17