summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:44 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:44 -0500
commit514f18cdda0abafdb3769ae4863ff03e57eeaed4 (patch)
tree10fb2b7aa70faa22767f43e33a0f201ab8ebcc5e /src/mem
parent3a726752c1d200325495a527893eceb13c1ce5c5 (diff)
downloadgem5-514f18cdda0abafdb3769ae4863ff03e57eeaed4.tar.xz
ruby: cache recorder: move check on block size to RubySystem.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ruby/system/CacheRecorder.cc9
-rw-r--r--src/mem/ruby/system/System.cc10
2 files changed, 9 insertions, 10 deletions
diff --git a/src/mem/ruby/system/CacheRecorder.cc b/src/mem/ruby/system/CacheRecorder.cc
index 339cf1b4f..9568d6a88 100644
--- a/src/mem/ruby/system/CacheRecorder.cc
+++ b/src/mem/ruby/system/CacheRecorder.cc
@@ -58,15 +58,6 @@ CacheRecorder::CacheRecorder(uint8_t* uncompressed_trace,
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 --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index b623e351d..ad2f59e4f 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -304,9 +304,17 @@ RubySystem::unserialize(CheckpointIn &cp)
// 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;