52 ChildList::const_iterator
i, end =
children.end();
53 for (i =
children.begin(); i != end; ++
i) {
55 ccprintf(os,
"%#x ", (intptr_t)node);
61 for (i =
children.begin(); i != end; ++
i) {
70 else if ((it = symtab->
find(addr)) != symtab->
end())
73 panic(
"could not find symbol for address %#x\n", addr);
76 node->
dump(symbol, (intptr_t)node, symtab, os);
84 ChildList::iterator
i, end =
children.end();
90 :
reset(0), symtab(_symtab)
106 for (
int i = 0, size = stack.size();
i < size; ++
i) {
128 map<Addr, Counter>::const_iterator
i, end =
pc_count.end();
129 for (i =
pc_count.begin(); i != end; ++
i) {
138 ccprintf(os,
"%s %d\n", it->name, count);
140 ccprintf(os,
"%#x %d\n", pc, count);
#define panic(...)
This implements a cprintf based panic() function.
void ccprintf(cp::Print &print)
const Loader::SymbolTable * symtab
void sample(ProfileNode *node, Addr pc)
const_iterator findNearest(Addr addr, Addr &nextaddr) const
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing...
std::map< Addr, Counter > pc_count
Overload hash function for BasicBlockRange type.
const_iterator end() const
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Declaration of Statistics objects.
FunctionProfile(const Loader::SymbolTable *symtab)
void dump(ThreadContext *tc, std::ostream &out) const
void registerResetCallback(Callback *cb)
Register a callback that should be called whenever statistics are reset.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int64_t Counter
Statistics counter type.
SymbolVector::const_iterator const_iterator
void dump(const std::string &symbol, uint64_t id, const Loader::SymbolTable *symtab, std::ostream &os) const
const_iterator find(Addr address) const
Helper template class to turn a simple class member function into a callback.
ProfileNode * consume(ThreadContext *tc, const StaticInstPtr &inst)