29#ifndef __CPU_PROFILE_HH__
30#define __CPU_PROFILE_HH__
38#include "debug/Stack.hh"
109 "Could not find symbol for address %#x\n",
addr);
125 void dump(
const std::string &symbol, uint64_t
id,
138 std::unique_ptr<BaseStackTrace>
trace;
147 void dump(std::ostream &out)
const;
154 if (!
trace->trace(tc, inst))
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
std::vector< Addr > stack
const std::vector< Addr > & getstack() const
virtual void trace(ThreadContext *tc, bool is_call)=0
bool trace(ThreadContext *tc, const StaticInstPtr &inst)
virtual ~BaseStackTrace()
void getSymbol(std::string &symbol, Addr addr, const loader::SymbolTable *symtab)
virtual bool tryGetSymbol(std::string &symbol, Addr addr, const loader::SymbolTable *symtab)
const loader::SymbolTable & symtab
ProfileNode * consume(ThreadContext *tc, const StaticInstPtr &inst)
std::map< Addr, Counter > pc_count
FunctionProfile(std::unique_ptr< BaseStackTrace > _trace, const loader::SymbolTable &symtab)
std::unique_ptr< BaseStackTrace > trace
void sample(ProfileNode *node, Addr pc)
std::map< Addr, ProfileNode * > ChildList
ThreadContext is the external interface to all thread state for anything outside of the CPU.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
double Counter
All counters are of 64-bit values.
void dump()
Dump all statistics data to the registered outputs.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.