diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-10-18 19:07:42 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-10-18 19:07:42 -0400 |
commit | a81c03737addc8e9a9b00cde0354e6c0ab4561af (patch) | |
tree | e7415ec9c2a97cf676d5599a1cec2c1fd775ace2 /cpu/base.hh | |
parent | 357ee7a845eac0bd903ed31e31eec993d54a698c (diff) | |
download | gem5-a81c03737addc8e9a9b00cde0354e6c0ab4561af.tar.xz |
Add new function profiling stuff, wrap the pc_sample stuff into it.
SConscript:
Get rid of the pc_sample stuff and move to the new profiling stuff
base/traceflags.py:
DPRINTF Stack stuff
cpu/base.cc:
cpu/base.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/simple/cpu.cc:
Add profiling stuff
kern/kernel_stats.hh:
Use a smart pointer
sim/system.cc:
sim/system.hh:
Create a new symbol table that has all of the symbols for a
particular system
util/stats/categories.py:
change around the categories, add categories for function
profiling stuff
util/stats/profile.py:
No profile parsing and display code to deal with function
profiling stuff, graph, dot, and text outputs.
--HG--
extra : convert_revision : b3de0cdc8bd468e42647966e2640ae009bda9eb8
Diffstat (limited to 'cpu/base.hh')
-rw-r--r-- | cpu/base.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpu/base.hh b/cpu/base.hh index b9617a730..914d06982 100644 --- a/cpu/base.hh +++ b/cpu/base.hh @@ -33,6 +33,7 @@ #include "base/statistics.hh" #include "config/full_system.hh" +#include "cpu/profile.hh" #include "cpu/sampler/sampler.hh" #include "sim/eventq.hh" #include "sim/sim_object.hh" @@ -76,6 +77,18 @@ class BaseCPU : public SimObject bool check_interrupts() const { return intstatus != 0; } uint64_t intr_status() const { return intstatus; } + + class ProfileEvent : public Event + { + private: + BaseCPU *cpu; + int interval; + + public: + ProfileEvent(BaseCPU *cpu, int interval); + void process(); + }; + ProfileEvent *profileEvent; #endif protected: @@ -113,7 +126,10 @@ class BaseCPU : public SimObject #if FULL_SYSTEM System *system; int cpu_id; + Tick profile; #endif + + Params(); }; const Params *params; @@ -122,6 +138,7 @@ class BaseCPU : public SimObject virtual ~BaseCPU(); virtual void init(); + virtual void startup(); virtual void regStats(); void registerExecContexts(); |