summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/System.cc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:24 -0500
committerBrandon Potter <brandon.potter@amd.com>2015-07-10 16:05:24 -0500
commitbfe7ee96ad5abec40639d47dc2b0512d6baa0f81 (patch)
treebf731166c1e2d1e1fb6a98fe3916700a4104671d /src/mem/ruby/system/System.cc
parentf9a370f1728fe5d752fa6962ba23774eec8c883e (diff)
downloadgem5-bfe7ee96ad5abec40639d47dc2b0512d6baa0f81.tar.xz
ruby: replace global g_abs_controls with per-RubySystem var
This is another step in the process of removing global variables from Ruby to enable multiple RubySystem instances in a single simulation. The list of abstract controllers is per-RubySystem and should be represented that way, rather than as a global. Since this is the last remaining Ruby global variable, the src/mem/ruby/Common/Global.* files are also removed.
Diffstat (limited to 'src/mem/ruby/system/System.cc')
-rw-r--r--src/mem/ruby/system/System.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index 128d16003..815b89ee5 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -68,12 +68,12 @@ RubySystem::RubySystem(const Params *p)
m_memory_size_bits = p->memory_size_bits;
// Resize to the size of different machine types
- g_abs_controls.resize(MachineType_NUM);
+ m_abstract_controls.resize(MachineType_NUM);
// Collate the statistics before they are printed.
Stats::registerDumpCallback(new RubyStatsCallback(this));
// Create the profiler
- m_profiler = new Profiler(p);
+ m_profiler = new Profiler(p, this);
m_phys_mem = p->phys_mem;
}
@@ -89,7 +89,7 @@ RubySystem::registerAbstractController(AbstractController* cntrl)
m_abs_cntrl_vec.push_back(cntrl);
MachineID id = cntrl->getMachineID();
- g_abs_controls[id.getType()][id.getNum()] = cntrl;
+ m_abstract_controls[id.getType()][id.getNum()] = cntrl;
}
RubySystem::~RubySystem()