gem5  v21.1.0.2
Public Member Functions | Private Attributes | Friends | List of all members
gem5::FunctionProfile Class Reference

#include <profile.hh>

Public Member Functions

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

Private Attributes

const loader::SymbolTablesymtab
 
ProfileNode top
 
std::map< Addr, Counterpc_count
 
std::unique_ptr< BaseStackTracetrace
 

Friends

class ProfileNode
 

Detailed Description

Definition at line 131 of file profile.hh.

Constructor & Destructor Documentation

◆ FunctionProfile()

gem5::FunctionProfile::FunctionProfile ( std::unique_ptr< BaseStackTrace _trace,
const loader::SymbolTable symtab 
)

Definition at line 99 of file profile.cc.

References clear(), and gem5::statistics::registerResetCallback().

Member Function Documentation

◆ clear()

void gem5::FunctionProfile::clear ( )

Definition at line 122 of file profile.cc.

References pc_count.

Referenced by FunctionProfile().

◆ consume() [1/2]

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

◆ consume() [2/2]

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

Definition at line 153 of file profile.hh.

References trace.

◆ dump()

void gem5::FunctionProfile::dump ( std::ostream &  out) const

◆ sample()

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

Friends And Related Function Documentation

◆ ProfileNode

friend class ProfileNode
friend

Definition at line 134 of file profile.hh.

Referenced by consume().

Member Data Documentation

◆ pc_count

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

Definition at line 138 of file profile.hh.

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

◆ symtab

const loader::SymbolTable& gem5::FunctionProfile::symtab
private

Definition at line 136 of file profile.hh.

Referenced by gem5::ProfileNode::dump(), dump(), and sample().

◆ top

ProfileNode gem5::FunctionProfile::top
private

Definition at line 137 of file profile.hh.

Referenced by consume().

◆ trace

std::unique_ptr<BaseStackTrace> gem5::FunctionProfile::trace
private

Definition at line 139 of file profile.hh.

Referenced by consume(), gem5::ProfileNode::dump(), and dump().


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

Generated on Tue Sep 21 2021 12:27:37 for gem5 by doxygen 1.8.17