summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:43 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:43 -0500
commita6f3f38f2c444dd3bc7c72296cbccdabbbff495a (patch)
tree04aada63bf055d0cf9b03ac527d080ea2b45d781 /src/mem/ruby/system
parent9648c05db19292ddd285a80914593cc0631403ff (diff)
downloadgem5-a6f3f38f2c444dd3bc7c72296cbccdabbbff495a.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 c00082010..b623e351d 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::serializeOld(CheckpointOut &cp)
// 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::serializeOld(CheckpointOut &cp)
// 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);
@@ -267,7 +267,7 @@ RubySystem::serializeOld(CheckpointOut &cp)
void
RubySystem::readCompressedTrace(string filename, uint8_t *&raw_data,
- uint64& uncompressed_trace_size)
+ uint64_t &uncompressed_trace_size)
{
// Read the trace file
gzFile compressedTrace;
@@ -304,11 +304,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 787e4f4ae..5d306dfa2 100644
--- a/src/mem/ruby/system/System.hh
+++ b/src/mem/ruby/system/System.hh
@@ -118,14 +118,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);
void readCompressedTrace(std::string filename,
uint8_t *&raw_data,
- uint64& uncompressed_trace_size);
+ uint64_t &uncompressed_trace_size);
void writeCompressedTrace(uint8_t *raw_data, std::string file,
- uint64 uncompressed_trace_size);
+ uint64_t uncompressed_trace_size);
private:
// configuration parameters