gem5  v20.1.0.0
Public Member Functions | Private Attributes | Friends | List of all members
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 127 of file profile.hh.

Constructor & Destructor Documentation

◆ FunctionProfile()

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

Definition at line 96 of file profile.cc.

References clear(), and Stats::registerResetCallback().

Member Function Documentation

◆ clear()

void FunctionProfile::clear ( )

Definition at line 119 of file profile.cc.

References pc_count.

Referenced by FunctionProfile().

◆ consume() [1/2]

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

Definition at line 104 of file profile.cc.

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

◆ consume() [2/2]

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

Definition at line 149 of file profile.hh.

References trace.

◆ dump()

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

Definition at line 126 of file profile.cc.

References ccprintf(), X86ISA::count, X86ISA::os, MipsISA::p, MipsISA::pc, pc_count, symtab, and trace.

◆ sample()

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

Friends And Related Function Documentation

◆ ProfileNode

friend class ProfileNode
friend

Definition at line 130 of file profile.hh.

Referenced by consume().

Member Data Documentation

◆ pc_count

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

Definition at line 134 of file profile.hh.

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

◆ symtab

const Loader::SymbolTable& FunctionProfile::symtab
private

Definition at line 132 of file profile.hh.

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

◆ top

ProfileNode FunctionProfile::top
private

Definition at line 133 of file profile.hh.

Referenced by consume().

◆ trace

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

Definition at line 135 of file profile.hh.

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


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

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