gem5  v20.0.0.3
Public Member Functions | Private Attributes | List of all members
FunctionProfile Class Reference

#include <profile.hh>

Public Member Functions

 FunctionProfile (const Loader::SymbolTable *symtab)
 
 ~FunctionProfile ()
 
ProfileNodeconsume (ThreadContext *tc, const StaticInstPtr &inst)
 
ProfileNodeconsume (const std::vector< Addr > &stack)
 
void clear ()
 
void dump (ThreadContext *tc, std::ostream &out) const
 
void sample (ProfileNode *node, Addr pc)
 

Private Attributes

Callbackreset
 
const Loader::SymbolTablesymtab
 
ProfileNode top
 
std::map< Addr, Counterpc_count
 
TheISA::StackTrace trace
 

Detailed Description

Definition at line 61 of file profile.hh.

Constructor & Destructor Documentation

◆ FunctionProfile()

FunctionProfile::FunctionProfile ( const Loader::SymbolTable symtab)

Definition at line 86 of file profile.cc.

References Stats::registerResetCallback(), and reset.

◆ ~FunctionProfile()

FunctionProfile::~FunctionProfile ( )

Definition at line 93 of file profile.cc.

References reset.

Member Function Documentation

◆ clear()

void FunctionProfile::clear ( )

Definition at line 115 of file profile.cc.

References pc_count.

Referenced by ThreadState::profileClear().

◆ consume() [1/2]

ProfileNode * FunctionProfile::consume ( ThreadContext tc,
const StaticInstPtr inst 
)
inline

Definition at line 82 of file profile.hh.

Referenced by BaseSimpleCPU::postExecute().

◆ consume() [2/2]

ProfileNode * FunctionProfile::consume ( const std::vector< Addr > &  stack)

Definition at line 100 of file profile.cc.

References ProfileNode::children, ArmISA::i, and top.

◆ dump()

void FunctionProfile::dump ( ThreadContext tc,
std::ostream &  out 
) const

◆ sample()

void FunctionProfile::sample ( ProfileNode node,
Addr  pc 
)

Member Data Documentation

◆ pc_count

std::map<Addr, Counter> FunctionProfile::pc_count
private

Definition at line 67 of file profile.hh.

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

◆ reset

Callback* FunctionProfile::reset
private

Definition at line 64 of file profile.hh.

Referenced by FunctionProfile(), and ~FunctionProfile().

◆ symtab

const Loader::SymbolTable* FunctionProfile::symtab
private

Definition at line 65 of file profile.hh.

Referenced by dump(), and sample().

◆ top

ProfileNode FunctionProfile::top
private

Definition at line 66 of file profile.hh.

Referenced by consume().

◆ trace

TheISA::StackTrace FunctionProfile::trace
private

Definition at line 68 of file profile.hh.


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

Generated on Fri Jul 3 2020 15:53:14 for gem5 by doxygen 1.8.13