changeset fe230bcf3f38 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=fe230bcf3f38
description:
        ruby: cache recorder: move check on block size to RubySystem.

diffstat:

 src/mem/ruby/system/CacheRecorder.cc |   9 ---------
 src/mem/ruby/system/System.cc        |  10 +++++++++-
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (41 lines):

diff -r 6d709f3c4c09 -r fe230bcf3f38 src/mem/ruby/system/CacheRecorder.cc
--- a/src/mem/ruby/system/CacheRecorder.cc      Fri Aug 14 19:28:44 2015 -0500
+++ b/src/mem/ruby/system/CacheRecorder.cc      Fri Aug 14 19:28:44 2015 -0500
@@ -58,15 +58,6 @@
       m_seq_map(seq_map),  m_bytes_read(0), m_records_read(0),
       m_records_flushed(0), m_block_size_bytes(block_size_bytes)
 {
-    if (m_uncompressed_trace != NULL) {
-        if (m_block_size_bytes < RubySystem::getBlockSizeBytes()) {
-            // Block sizes larger than when the trace was recorded are not
-            // supported, as we cannot reliably turn accesses to smaller blocks
-            // into larger ones.
-            panic("Recorded cache block size (%d) < current block size (%d) 
!!",
-                    m_block_size_bytes, RubySystem::getBlockSizeBytes());
-        }
-    }
 }
 
 CacheRecorder::~CacheRecorder()
diff -r 6d709f3c4c09 -r fe230bcf3f38 src/mem/ruby/system/System.cc
--- a/src/mem/ruby/system/System.cc     Fri Aug 14 19:28:44 2015 -0500
+++ b/src/mem/ruby/system/System.cc     Fri Aug 14 19:28:44 2015 -0500
@@ -304,9 +304,17 @@
     // This value should be set to the checkpoint-system's block-size.
     // Optional, as checkpoints without it can be run if the
     // checkpoint-system's block-size == current block-size.
-    uint64_t block_size_bytes = getBlockSizeBytes();
+    uint64_t block_size_bytes = m_block_size_bytes;
     UNSERIALIZE_OPT_SCALAR(block_size_bytes);
 
+    if (block_size_bytes < m_block_size_bytes) {
+        // Block sizes larger than when the trace was recorded are not
+        // supported, as we cannot reliably turn accesses to smaller blocks
+        // into larger ones.
+        panic("Recorded cache block size (%d) < current block size (%d) !!",
+              block_size_bytes, m_block_size_bytes);
+    }
+
     string cache_trace_file;
     uint64_t cache_trace_size = 0;
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to