gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
FunctionProfile Class Reference

#include <profile.hh>

Public Member Functions

 FunctionProfile (const 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 SymbolTablesymtab
 
ProfileNode top
 
std::map< Addr, Counterpc_count
 
TheISA::StackTrace trace
 

Detailed Description

Definition at line 63 of file profile.hh.

Constructor & Destructor Documentation

FunctionProfile::FunctionProfile ( const SymbolTable symtab)

Definition at line 88 of file profile.cc.

References Stats::registerResetCallback(), and reset.

FunctionProfile::~FunctionProfile ( )

Definition at line 95 of file profile.cc.

References reset.

Member Function Documentation

void FunctionProfile::clear ( )

Definition at line 117 of file profile.cc.

References ProfileNode::clear(), pc_count, and top.

Referenced by ThreadState::profileClear().

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

Definition at line 84 of file profile.hh.

References trace.

Referenced by BaseSimpleCPU::postExecute().

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

Definition at line 102 of file profile.cc.

References ProfileNode::children, ArmISA::i, X86ISA::size(), and top.

void FunctionProfile::dump ( ThreadContext tc,
std::ostream &  out 
) const
void FunctionProfile::sample ( ProfileNode node,
Addr  pc 
)

Definition at line 146 of file profile.cc.

References ProfileNode::count, SymbolTable::findNearestAddr(), pc, pc_count, and symtab.

Referenced by ThreadState::profileSample().

Member Data Documentation

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

Definition at line 69 of file profile.hh.

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

Callback* FunctionProfile::reset
private

Definition at line 66 of file profile.hh.

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

const SymbolTable* FunctionProfile::symtab
private

Definition at line 67 of file profile.hh.

Referenced by dump(), and sample().

ProfileNode FunctionProfile::top
private

Definition at line 68 of file profile.hh.

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

TheISA::StackTrace FunctionProfile::trace
private

Definition at line 70 of file profile.hh.

Referenced by consume().


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

Generated on Fri Jun 9 2017 13:04:10 for gem5 by doxygen 1.8.6