From 514f18cdda0abafdb3769ae4863ff03e57eeaed4 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 14 Aug 2015 19:28:44 -0500 Subject: ruby: cache recorder: move check on block size to RubySystem. --- src/mem/ruby/system/System.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mem/ruby/system/System.cc') 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; -- cgit v1.2.3