summaryrefslogtreecommitdiff
path: root/sim/system.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2004-05-17 15:08:24 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2004-05-17 15:08:24 -0400
commitb8082eb508f15f09eb7416a67b6d3a1886b4fa34 (patch)
treedc921c20d907c8ea16d473f4abf95cf34f5446ff /sim/system.hh
parent73501ea38f3c3e53fc02561444e25989c29224af (diff)
downloadgem5-b8082eb508f15f09eb7416a67b6d3a1886b4fa34.tar.xz
lift system-independent binning stuff out of Tru64System into System.
kern/tru64/tru64_system.cc: make binned_fns a parameter for System in addition to Tru64System. Do all the fnEvents setting at the System level, since that is system-independent. kern/tru64/tru64_system.hh: deal with FnEvents in the System, and move some fns over to System. sim/system.cc: sim/system.hh: lift binning stuff into System out of Tru64System --HG-- extra : convert_revision : 591dee6f2013f5c43037726c529a00682b5cf82e
Diffstat (limited to 'sim/system.hh')
-rw-r--r--sim/system.hh22
1 files changed, 16 insertions, 6 deletions
diff --git a/sim/system.hh b/sim/system.hh
index 050d1dd11..564579fe4 100644
--- a/sim/system.hh
+++ b/sim/system.hh
@@ -35,6 +35,7 @@
#include "base/loader/symtab.hh"
#include "base/statistics.hh"
#include "cpu/pc_event.hh"
+#include "kern/system_events.hh"
#include "sim/sim_object.hh"
#include "sim/sw_context.hh"
@@ -48,17 +49,20 @@ class ExecContext;
class System : public SimObject
{
// lisa's binning stuff
- protected:
+ private:
std::map<const std::string, Statistics::MainBin *> fnBins;
std::map<const Addr, SWContext *> swCtxMap;
+ protected:
+ std::vector<FnEvent *> fnEvents;
+
public:
Statistics::Scalar<> fnCalls;
Statistics::MainBin *Kernel;
Statistics::MainBin *User;
Statistics::MainBin * getBin(const std::string &name);
- virtual bool findCaller(std::string, std::string) const = 0;
+ bool findCaller(std::string, std::string) const;
SWContext *findContext(Addr pcb);
bool addContext(Addr pcb, SWContext *ctx) {
@@ -68,18 +72,23 @@ class System : public SimObject
swCtxMap.erase(pcb);
return;
}
-
- virtual void dumpState(ExecContext *xc) const = 0;
+ void dumpState(ExecContext *xc) const;
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
- //
+
+
+ private:
+ std::multimap<const std::string, std::string> callerMap;
+ void populateMap(std::string caller, std::string callee);
+//
public:
const uint64_t init_param;
MemoryController *memCtrl;
PhysicalMemory *physmem;
bool bin;
+ std::vector<string> binned_fns;
PCEventQueue pcEventQueue;
@@ -90,7 +99,8 @@ class System : public SimObject
public:
System(const std::string _name, const uint64_t _init_param,
- MemoryController *, PhysicalMemory *, const bool);
+ MemoryController *, PhysicalMemory *, const bool,
+ const std::vector<string> &binned_fns);
~System();
virtual Addr getKernelStart() const = 0;