changeset 02d7ac5fb855 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=02d7ac5fb855
description:
        Ruby: Remove some unused typedefs
        This patch removes some of the unused typedefs. It also moves
        some of the typedefs from Global.hh to TypeDefines.hh. The patch
        also eliminates the file NodeID.hh.

diffstat:

 src/cpu/testers/rubytest/Check.hh                            |   1 -
 src/mem/protocol/RubySlicc_Types.sm                          |   2 +-
 src/mem/ruby/SConscript                                      |   1 -
 src/mem/ruby/common/Address.hh                               |   3 +-
 src/mem/ruby/common/DataBlock.hh                             |   2 +-
 src/mem/ruby/common/Driver.hh                                |   1 -
 src/mem/ruby/common/Global.hh                                |  11 +--
 src/mem/ruby/common/Histogram.hh                             |   2 +-
 src/mem/ruby/common/NetDest.hh                               |   1 -
 src/mem/ruby/common/Set.hh                                   |   1 -
 src/mem/ruby/common/TypeDefines.hh                           |   5 +
 src/mem/ruby/eventqueue/RubyEventQueue.hh                    |   2 +-
 src/mem/ruby/network/Network.hh                              |   1 -
 src/mem/ruby/network/Topology.hh                             |   3 +-
 src/mem/ruby/network/garnet/NetworkHeader.hh                 |   3 -
 src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh   |   1 +
 src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh  |   1 +
 src/mem/ruby/network/simple/PerfectSwitch.cc                 |   3 +-
 src/mem/ruby/network/simple/PerfectSwitch.hh                 |   1 -
 src/mem/ruby/network/simple/SimpleNetwork.hh                 |   1 -
 src/mem/ruby/network/simple/Throttle.cc                      |   4 +-
 src/mem/ruby/network/simple/Throttle.hh                      |   1 -
 src/mem/ruby/profiler/AccessTraceForAddress.hh               |   1 -
 src/mem/ruby/profiler/AddressProfiler.hh                     |   1 -
 src/mem/ruby/profiler/CacheProfiler.hh                       |   1 -
 src/mem/ruby/profiler/MemCntrlProfiler.hh                    |   2 +-
 src/mem/ruby/profiler/Profiler.hh                            |   1 -
 src/mem/ruby/recorder/CacheRecorder.hh                       |   1 -
 src/mem/ruby/recorder/TraceRecord.hh                         |   1 -
 src/mem/ruby/recorder/Tracer.hh                              |   1 -
 src/mem/ruby/slicc_interface/Message.hh                      |   1 +
 src/mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh   |   1 -
 src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh |   1 -
 src/mem/ruby/slicc_interface/RubySlicc_Util.hh               |   1 -
 src/mem/ruby/system/MachineID.hh                             |   1 -
 src/mem/ruby/system/NodeID.hh                                |  45 ------------
 src/mem/slicc/symbols/StateMachine.py                        |   2 +-
 src/mem/slicc/symbols/Type.py                                |   2 -
 38 files changed, 20 insertions(+), 94 deletions(-)

diffs (truncated from 493 to 300 lines):

diff -r 5fb918115c07 -r 02d7ac5fb855 src/cpu/testers/rubytest/Check.hh
--- a/src/cpu/testers/rubytest/Check.hh Mon Oct 31 01:09:44 2011 -0700
+++ b/src/cpu/testers/rubytest/Check.hh Thu Nov 03 22:46:45 2011 -0500
@@ -37,7 +37,6 @@
 #include "mem/protocol/TesterStatus.hh"
 #include "mem/ruby/common/Address.hh"
 #include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class SubBlock;
 
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/protocol/RubySlicc_Types.sm
--- a/src/mem/protocol/RubySlicc_Types.sm       Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/protocol/RubySlicc_Types.sm       Thu Nov 03 22:46:45 2011 -0500
@@ -48,7 +48,7 @@
   bool isEmpty();
 }
 
-external_type(NodeID, default="0");
+external_type(NodeID, default="0", primitive="yes");
 external_type(MachineID);
 
 MessageBuffer getMandatoryQueue(int core_id);
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/SConscript
--- a/src/mem/ruby/SConscript   Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/SConscript   Thu Nov 03 22:46:45 2011 -0500
@@ -109,7 +109,6 @@
 MakeInclude('system/MachineID.hh')
 MakeInclude('system/MemoryControl.hh')
 MakeInclude('system/WireBuffer.hh')
-MakeInclude('system/NodeID.hh')
 MakeInclude('system/PerfectCacheMemory.hh')
 MakeInclude('system/PersistentTable.hh')
 MakeInclude('system/Sequencer.hh')
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/Address.hh
--- a/src/mem/ruby/common/Address.hh    Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/Address.hh    Thu Nov 03 22:46:45 2011 -0500
@@ -33,8 +33,7 @@
 #include <iomanip>
 
 #include "base/hashmap.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
+#include "mem/ruby/common/TypeDefines.hh"
 
 const int ADDRESS_WIDTH = 64; // address width in bytes
 
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/DataBlock.hh
--- a/src/mem/ruby/common/DataBlock.hh  Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/DataBlock.hh  Thu Nov 03 22:46:45 2011 -0500
@@ -32,7 +32,7 @@
 #include <iomanip>
 #include <iostream>
 
-#include "mem/ruby/common/Global.hh"
+#include "mem/ruby/common/TypeDefines.hh"
 
 class DataBlock
 {
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/Driver.hh
--- a/src/mem/ruby/common/Driver.hh     Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/Driver.hh     Thu Nov 03 22:46:45 2011 -0500
@@ -34,7 +34,6 @@
 #include "mem/ruby/common/Address.hh"
 #include "mem/ruby/common/Consumer.hh"
 #include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class Driver
 {
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/Global.hh
--- a/src/mem/ruby/common/Global.hh     Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/Global.hh     Thu Nov 03 22:46:45 2011 -0500
@@ -29,16 +29,7 @@
 #ifndef __MEM_RUBY_COMMON_GLOBAL_HH__
 #define __MEM_RUBY_COMMON_GLOBAL_HH__
 
-// external includes for all classes
-#include "mem/ruby/common/TypeDefines.hh"
-
-// simple type declarations
-typedef Time LogicalTime;
-typedef int64 Index;            // what the address bit ripper returns
-typedef int word;               // one word of a cache line
-typedef unsigned int uint;
-typedef int SwitchID;
-typedef int LinkID;
+#include "base/str.hh"
 
 class RubyEventQueue;
 extern RubyEventQueue* g_eventQueue_ptr;
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/Histogram.hh
--- a/src/mem/ruby/common/Histogram.hh  Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/Histogram.hh  Thu Nov 03 22:46:45 2011 -0500
@@ -32,7 +32,7 @@
 #include <iostream>
 #include <vector>
 
-#include "mem/ruby/common/Global.hh"
+#include "mem/ruby/common/TypeDefines.hh"
 
 class Histogram
 {
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/NetDest.hh
--- a/src/mem/ruby/common/NetDest.hh    Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/NetDest.hh    Thu Nov 03 22:46:45 2011 -0500
@@ -42,7 +42,6 @@
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/common/Set.hh"
 #include "mem/ruby/system/MachineID.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class NetDest
 {
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/Set.hh
--- a/src/mem/ruby/common/Set.hh        Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/Set.hh        Thu Nov 03 22:46:45 2011 -0500
@@ -36,7 +36,6 @@
 #include <limits>
 
 #include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
 #include "mem/ruby/system/System.hh"
 
 class Set
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/common/TypeDefines.hh
--- a/src/mem/ruby/common/TypeDefines.hh        Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/common/TypeDefines.hh        Thu Nov 03 22:46:45 2011 -0500
@@ -44,4 +44,9 @@
 typedef int64 Time;
 typedef uint64 physical_address_t;
 
+typedef int64 Index;            // what the address bit ripper returns
+typedef int LinkID;
+typedef int NodeID;
+typedef int SwitchID;
+
 #endif
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/eventqueue/RubyEventQueue.hh
--- a/src/mem/ruby/eventqueue/RubyEventQueue.hh Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/eventqueue/RubyEventQueue.hh Thu Nov 03 22:46:45 2011 -0500
@@ -59,7 +59,7 @@
 #include <iostream>
 
 #include "config/no_vector_bounds_checks.hh"
-#include "mem/ruby/common/Global.hh"
+#include "mem/ruby/common/TypeDefines.hh"
 #include "sim/eventq.hh"
 
 class Consumer;
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/network/Network.hh
--- a/src/mem/ruby/network/Network.hh   Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/Network.hh   Thu Nov 03 22:46:45 2011 -0500
@@ -47,7 +47,6 @@
 #include "mem/protocol/LinkDirection.hh"
 #include "mem/protocol/MessageSizeType.hh"
 #include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
 #include "mem/ruby/system/System.hh"
 #include "params/RubyNetwork.hh"
 #include "sim/sim_object.hh"
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/network/Topology.hh
--- a/src/mem/ruby/network/Topology.hh  Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/Topology.hh  Thu Nov 03 22:46:45 2011 -0500
@@ -45,8 +45,7 @@
 #include <vector>
 
 #include "mem/protocol/LinkDirection.hh"
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
+#include "mem/ruby/common/TypeDefines.hh"
 #include "params/Topology.hh"
 #include "sim/sim_object.hh"
 
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/garnet/NetworkHeader.hh
--- a/src/mem/ruby/network/garnet/NetworkHeader.hh      Mon Oct 31 01:09:44 
2011 -0700
+++ b/src/mem/ruby/network/garnet/NetworkHeader.hh      Thu Nov 03 22:46:45 
2011 -0500
@@ -31,9 +31,6 @@
 #ifndef __MEM_RUBY_NETWORK_GARNET_NETWORKHEADER_HH__
 #define __MEM_RUBY_NETWORK_GARNET_NETWORKHEADER_HH__
 
-#include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
-
 enum flit_type {HEAD_, BODY_, TAIL_, HEAD_TAIL_, NUM_FLIT_TYPE_};
 enum VC_state_type {IDLE_, VC_AB_, ACTIVE_, NUM_VC_STATE_TYPE_};
 enum VNET_type {CTRL_VNET_, DATA_VNET_, NULL_VNET_, NUM_VNET_TYPE_};
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh
--- a/src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh        Mon Oct 
31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/InVcState.hh        Thu Nov 
03 22:46:45 2011 -0500
@@ -31,6 +31,7 @@
 #ifndef __MEM_RUBY_NETWORK_GARNET_FLEXIBLE_PIPELINE_IN_VC_STATE_HH__
 #define __MEM_RUBY_NETWORK_GARNET_FLEXIBLE_PIPELINE_IN_VC_STATE_HH__
 
+#include "mem/ruby/common/TypeDefines.hh"
 #include "mem/ruby/network/garnet/NetworkHeader.hh"
 
 class InVcState
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh
--- a/src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh       Mon Oct 
31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/OutVcState.hh       Thu Nov 
03 22:46:45 2011 -0500
@@ -31,6 +31,7 @@
 #ifndef __MEM_RUBY_NETWORK_GARNET_FLEXIBLE_PIPELINE_OUT_VC_STATE_HH__
 #define __MEM_RUBY_NETWORK_GARNET_FLEXIBLE_PIPELINE_OUT_VC_STATE_HH__
 
+#include "mem/ruby/common/TypeDefines.hh"
 #include "mem/ruby/network/garnet/NetworkHeader.hh"
 
 class OutVcState
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/simple/PerfectSwitch.cc
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc      Mon Oct 31 01:09:44 
2011 -0700
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc      Thu Nov 03 22:46:45 
2011 -0500
@@ -71,8 +71,7 @@
     for (int j = 0; j < m_virtual_networks; j++) {
         m_in[port][j]->setConsumer(this);
         string desc = csprintf("[Queue from port %s %s %s to PerfectSwitch]",
-            NodeIDToString(m_switch_id), NodeIDToString(port),
-            NodeIDToString(j));
+            to_string(m_switch_id), to_string(port), to_string(j));
         m_in[port][j]->setDescription(desc);
         m_in[port][j]->setIncomingLink(port);
         m_in[port][j]->setVnet(j);
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/simple/PerfectSwitch.hh
--- a/src/mem/ruby/network/simple/PerfectSwitch.hh      Mon Oct 31 01:09:44 
2011 -0700
+++ b/src/mem/ruby/network/simple/PerfectSwitch.hh      Thu Nov 03 22:46:45 
2011 -0500
@@ -42,7 +42,6 @@
 
 #include "mem/ruby/common/Consumer.hh"
 #include "mem/ruby/common/Global.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class MessageBuffer;
 class NetDest;
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/network/simple/SimpleNetwork.hh
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh      Mon Oct 31 01:09:44 
2011 -0700
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh      Thu Nov 03 22:46:45 
2011 -0500
@@ -34,7 +34,6 @@
 
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/network/Network.hh"
-#include "mem/ruby/system/NodeID.hh"
 #include "params/SimpleNetwork.hh"
 #include "sim/sim_object.hh"
 
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/network/simple/Throttle.cc
--- a/src/mem/ruby/network/simple/Throttle.cc   Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/simple/Throttle.cc   Thu Nov 03 22:46:45 2011 -0500
@@ -113,8 +113,8 @@
 
     // Set consumer and description
     m_in[m_vnets]->setConsumer(this);
-    string desc = "[Queue to Throttle " + NodeIDToString(m_sID) + " " +
-        NodeIDToString(m_node) + "]";
+    string desc = "[Queue to Throttle " + to_string(m_sID) + " " +
+        to_string(m_node) + "]";
     m_in[m_vnets]->setDescription(desc);
     m_vnets++;
 }
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/network/simple/Throttle.hh
--- a/src/mem/ruby/network/simple/Throttle.hh   Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/network/simple/Throttle.hh   Thu Nov 03 22:46:45 2011 -0500
@@ -45,7 +45,6 @@
 #include "mem/ruby/common/Consumer.hh"
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/network/Network.hh"
-#include "mem/ruby/system/NodeID.hh"
 #include "mem/ruby/system/System.hh"
 
 class MessageBuffer;
diff -r 5fb918115c07 -r 02d7ac5fb855 
src/mem/ruby/profiler/AccessTraceForAddress.hh
--- a/src/mem/ruby/profiler/AccessTraceForAddress.hh    Mon Oct 31 01:09:44 
2011 -0700
+++ b/src/mem/ruby/profiler/AccessTraceForAddress.hh    Thu Nov 03 22:46:45 
2011 -0500
@@ -36,7 +36,6 @@
 #include "mem/ruby/common/Address.hh"
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/common/Set.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class Histogram;
 
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/profiler/AddressProfiler.hh
--- a/src/mem/ruby/profiler/AddressProfiler.hh  Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/profiler/AddressProfiler.hh  Thu Nov 03 22:46:45 2011 -0500
@@ -38,7 +38,6 @@
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/common/Histogram.hh"
 #include "mem/ruby/profiler/AccessTraceForAddress.hh"
-#include "mem/ruby/system/NodeID.hh"
 
 class Set;
 
diff -r 5fb918115c07 -r 02d7ac5fb855 src/mem/ruby/profiler/CacheProfiler.hh
--- a/src/mem/ruby/profiler/CacheProfiler.hh    Mon Oct 31 01:09:44 2011 -0700
+++ b/src/mem/ruby/profiler/CacheProfiler.hh    Thu Nov 03 22:46:45 2011 -0500
@@ -39,7 +39,6 @@
 #include "mem/protocol/RubyRequestType.hh"
 #include "mem/ruby/common/Global.hh"
 #include "mem/ruby/common/Histogram.hh"
-#include "mem/ruby/system/NodeID.hh"
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to