summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-29 10:19:23 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-29 10:19:23 -0500
commit4727fc26f885d09f07f18a10fabe6c75dffe165f (patch)
treef66861617159e8b49b56347f849cb628ac76d517 /src/mem/ruby/system
parente9d6bf5e35b732df925f65a7b7adaa746f6a7f3b (diff)
downloadgem5-4727fc26f885d09f07f18a10fabe6c75dffe165f.tar.xz
ruby: eliminate type uint64 and int64
These types are being replaced with uint64_t and int64_t.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/CacheRecorder.cc6
-rw-r--r--src/mem/ruby/system/CacheRecorder.hh2
-rw-r--r--src/mem/ruby/system/System.cc16
-rw-r--r--src/mem/ruby/system/System.hh8
4 files changed, 16 insertions, 16 deletions
diff --git a/src/mem/ruby/system/CacheRecorder.cc b/src/mem/ruby/system/CacheRecorder.cc
index a2ac6bdf8..339cf1b4f 100644
--- a/src/mem/ruby/system/CacheRecorder.cc
+++ b/src/mem/ruby/system/CacheRecorder.cc
@@ -161,13 +161,13 @@ CacheRecorder::addRecord(int cntrl, Addr data_addr, Addr pc_addr,
m_records.push_back(rec);
}
-uint64
-CacheRecorder::aggregateRecords(uint8_t** buf, uint64 total_size)
+uint64_t
+CacheRecorder::aggregateRecords(uint8_t **buf, uint64_t total_size)
{
std::sort(m_records.begin(), m_records.end(), compareTraceRecords);
int size = m_records.size();
- uint64 current_size = 0;
+ uint64_t current_size = 0;
int record_size = sizeof(TraceRecord) + m_block_size_bytes;
for (int i = 0; i < size; ++i) {
diff --git a/src/mem/ruby/system/CacheRecorder.hh b/src/mem/ruby/system/CacheRecorder.hh
index a4a7261f4..44110cf9f 100644
--- a/src/mem/ruby/system/CacheRecorder.hh
+++ b/src/mem/ruby/system/CacheRecorder.hh
@@ -77,7 +77,7 @@ class CacheRecorder
void addRecord(int cntrl, Addr data_addr, Addr pc_addr,
RubyRequestType type, Tick time, DataBlock& data);
- uint64 aggregateRecords(uint8_t** data, uint64 size);
+ uint64_t aggregateRecords(uint8_t **data, uint64_t size);
/*!
* Function for flushing the memory contents of the caches to the
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index fd712a47a..6ebdd3ad6 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -102,8 +102,8 @@ RubySystem::~RubySystem()
void
RubySystem::makeCacheRecorder(uint8_t *uncompressed_trace,
- uint64 cache_trace_size,
- uint64 block_size_bytes)
+ uint64_t cache_trace_size,
+ uint64_t block_size_bytes)
{
vector<Sequencer*> sequencer_map;
Sequencer* sequencer_ptr = NULL;
@@ -207,7 +207,7 @@ RubySystem::memWriteback()
void
RubySystem::writeCompressedTrace(uint8_t *raw_data, string filename,
- uint64 uncompressed_trace_size)
+ uint64_t uncompressed_trace_size)
{
// Create the checkpoint file for the memory
string thefile = CheckpointIn::dir() + "/" + filename.c_str();
@@ -240,7 +240,7 @@ RubySystem::serialize(CheckpointOut &cp) const
// Store the cache-block size, so we are able to restore on systems with a
// different cache-block size. CacheRecorder depends on the correct
// cache-block size upon unserializing.
- uint64 block_size_bytes = getBlockSizeBytes();
+ uint64_t block_size_bytes = getBlockSizeBytes();
SERIALIZE_SCALAR(block_size_bytes);
// Check that there's a valid trace to use. If not, then memory won't be
@@ -252,7 +252,7 @@ RubySystem::serialize(CheckpointOut &cp) const
// Aggregate the trace entries together into a single array
uint8_t *raw_data = new uint8_t[4096];
- uint64 cache_trace_size = m_cache_recorder->aggregateRecords(&raw_data,
+ uint64_t cache_trace_size = m_cache_recorder->aggregateRecords(&raw_data,
4096);
string cache_trace_file = name() + ".cache.gz";
writeCompressedTrace(raw_data, cache_trace_file, cache_trace_size);
@@ -274,7 +274,7 @@ RubySystem::drainResume()
void
RubySystem::readCompressedTrace(string filename, uint8_t *&raw_data,
- uint64& uncompressed_trace_size)
+ uint64_t &uncompressed_trace_size)
{
// Read the trace file
gzFile compressedTrace;
@@ -311,11 +311,11 @@ 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 block_size_bytes = getBlockSizeBytes();
+ uint64_t block_size_bytes = getBlockSizeBytes();
UNSERIALIZE_OPT_SCALAR(block_size_bytes);
string cache_trace_file;
- uint64 cache_trace_size = 0;
+ uint64_t cache_trace_size = 0;
UNSERIALIZE_SCALAR(cache_trace_file);
UNSERIALIZE_SCALAR(cache_trace_size);
diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh
index a7afac45c..210a633e8 100644
--- a/src/mem/ruby/system/System.hh
+++ b/src/mem/ruby/system/System.hh
@@ -119,14 +119,14 @@ class RubySystem : public ClockedObject
RubySystem& operator=(const RubySystem& obj);
void makeCacheRecorder(uint8_t *uncompressed_trace,
- uint64 cache_trace_size,
- uint64 block_size_bytes);
+ uint64_t cache_trace_size,
+ uint64_t block_size_bytes);
static void readCompressedTrace(std::string filename,
uint8_t *&raw_data,
- uint64& uncompressed_trace_size);
+ uint64_t &uncompressed_trace_size);
static void writeCompressedTrace(uint8_t *raw_data, std::string file,
- uint64 uncompressed_trace_size);
+ uint64_t uncompressed_trace_size);
private:
// configuration parameters