summaryrefslogtreecommitdiff
path: root/sim/system.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/system.cc')
-rw-r--r--sim/system.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/sim/system.cc b/sim/system.cc
index 791a092ac..b5a0e7a56 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2002-2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -52,22 +52,25 @@ System::System(const std::string _name,
bin(_bin),
binned_fns(binned_fns)
{
+ // increment the number of running systems
+ numSystemsRunning++;
+
// add self to global system list
systemList.push_back(this);
if (bin == true) {
- Kernel = new Statistics::MainBin("non TCPIP Kernel stats");
+ Kernel = new Stats::MainBin("non TCPIP Kernel stats");
Kernel->activate();
- User = new Statistics::MainBin("User stats");
+ User = new Stats::MainBin("User stats");
int end = binned_fns.size();
assert(!(end & 1));
- Statistics::MainBin *Bin;
+ Stats::MainBin *Bin;
fnEvents.resize(end>>1);
for (int i = 0; i < end; i +=2) {
- Bin = new Statistics::MainBin(binned_fns[i]);
+ Bin = new Stats::MainBin(binned_fns[i]);
fnBins.insert(make_pair(binned_fns[i], Bin));
fnEvents[(i>>1)] = new FnEvent(&pcEventQueue, binned_fns[i], this);
@@ -178,10 +181,10 @@ System::dumpState(ExecContext *xc) const
}
}
-Statistics::MainBin *
+Stats::MainBin *
System::getBin(const std::string &name)
{
- std::map<const std::string, Statistics::MainBin *>::const_iterator i;
+ std::map<const std::string, Stats::MainBin *>::const_iterator i;
i = fnBins.find(name);
if (i == fnBins.end())
panic("trying to getBin %s that is not on system map!", name);