summaryrefslogtreecommitdiff
path: root/sim/system.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2004-05-18 01:40:03 -0400
commita0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f (patch)
tree71de26a0139e7db042c79989ae745377d98c3d23 /sim/system.hh
parent4d98ab1ca92c2d88d3ee13a7518acc36a6d5bf84 (diff)
parent02af86f7e813db27b12214ea377948f07f891b69 (diff)
downloadgem5-a0ccdf8aba8f71c8d66c03f5c6907d0a3c2e091f.tar.xz
merge m5 with linux for the event and binning lifting
--HG-- extra : convert_revision : 09d3678746c2e9a93a9982dc75d5e1ac309cb2fa
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 0fcdd77cc..08fcfb784 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"
@@ -49,17 +50,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) {
@@ -69,12 +73,16 @@ 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;
@@ -82,6 +90,7 @@ class System : public SimObject
PhysicalMemory *physmem;
Platform *platform;
bool bin;
+ std::vector<string> binned_fns;
PCEventQueue pcEventQueue;
@@ -92,7 +101,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;