summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
committerJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
commitb4c10bd6800b5ab5adee3035f1908d7a49a14ca9 (patch)
treed21b1bbf5c8df8c77d77b6983779b24189a1d8cb /src/sim
parenta679e732cee821616c20cc13c22ad2877072ff14 (diff)
downloadgem5-b4c10bd6800b5ab5adee3035f1908d7a49a14ca9.tar.xz
mcpat: Adds McPAT performance counters
Updated patches from Rick Strong's set that modify performance counters for McPAT
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/System.py3
-rw-r--r--src/sim/system.cc13
-rw-r--r--src/sim/system.hh6
3 files changed, 21 insertions, 1 deletions
diff --git a/src/sim/System.py b/src/sim/System.py
index eec7b4ae5..e2d5b279b 100644
--- a/src/sim/System.py
+++ b/src/sim/System.py
@@ -1,4 +1,5 @@
# Copyright (c) 2005-2007 The Regents of The University of Michigan
+# Copyright (c) 2011 Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Nathan Binkert
+# Rick Strong
from m5.SimObject import SimObject
from m5.defines import buildEnv
@@ -44,6 +46,7 @@ class System(SimObject):
physmem = Param.PhysicalMemory(Parent.any, "physical memory")
mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in")
+
if buildEnv['FULL_SYSTEM']:
abstract = True
boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
diff --git a/src/sim/system.cc b/src/sim/system.cc
index d590adc91..68b02272e 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003-2006 The Regents of The University of Michigan
+ * Copyright (c) 2011 Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,6 +30,7 @@
* Lisa Hsu
* Nathan Binkert
* Ali Saidi
+ * Rick Strong
*/
#include "arch/isa_traits.hh"
@@ -70,7 +72,9 @@ System::System(Params *p)
pagePtr(0),
nextPID(0),
#endif
- memoryMode(p->mem_mode), _params(p)
+ memoryMode(p->mem_mode), _params(p),
+ totalNumInsts(0),
+ instEventQueue("system instruction-based event queue")
{
// add self to global system list
systemList.push_back(this);
@@ -277,6 +281,13 @@ System::freeMemSize()
#endif
void
+System::resume()
+{
+ SimObject::resume();
+ totalNumInsts = 0;
+}
+
+void
System::serialize(ostream &os)
{
#if FULL_SYSTEM
diff --git a/src/sim/system.hh b/src/sim/system.hh
index cdf7d3d7e..6c4f3e9ed 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2002-2005 The Regents of The University of Michigan
+ * Copyright (c) 2011 Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,6 +29,7 @@
* Authors: Steve Reinhardt
* Lisa Hsu
* Nathan Binkert
+ * Rick Strong
*/
#ifndef __SYSTEM_HH__
@@ -244,8 +246,12 @@ class System : public SimObject
void serialize(std::ostream &os);
void unserialize(Checkpoint *cp, const std::string &section);
+ virtual void resume();
public:
+ Counter totalNumInsts;
+ EventQueue instEventQueue;
+
////////////////////////////////////////////
//
// STATIC GLOBAL SYSTEM LIST