From 33c904e0a560be8c5f9aedaba9940ad0df52d81c Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 18 Sep 2012 22:49:12 -0500 Subject: [PATCH] ruby: eliminate typedef integer_t --- src/mem/ruby/common/Address.cc | 4 ++-- src/mem/ruby/common/TypeDefines.hh | 2 -- src/mem/ruby/profiler/Profiler.cc | 8 ++++---- src/mem/ruby/profiler/Profiler.hh | 8 ++++---- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc index cc87f4ece..d3f678863 100644 --- a/src/mem/ruby/common/Address.cc +++ b/src/mem/ruby/common/Address.cc @@ -55,10 +55,10 @@ Address::makeNextStrideAddress(int stride) + RubySystem::getBlockSizeBytes()*stride; } -integer_t +Index Address::memoryModuleIndex() const { - integer_t index = + Index index = bitSelect(RubySystem::getBlockSizeBits() + RubySystem::getMemorySizeBits(), ADDRESS_WIDTH); assert (index >= 0); diff --git a/src/mem/ruby/common/TypeDefines.hh b/src/mem/ruby/common/TypeDefines.hh index 9596b07b5..b031a62d3 100644 --- a/src/mem/ruby/common/TypeDefines.hh +++ b/src/mem/ruby/common/TypeDefines.hh @@ -34,8 +34,6 @@ typedef unsigned long long uint64; typedef long long int64; -typedef long long integer_t; - typedef int64 Time; typedef uint64 physical_address_t; diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc index b6982aca9..e84eea727 100644 --- a/src/mem/ruby/profiler/Profiler.cc +++ b/src/mem/ruby/profiler/Profiler.cc @@ -109,7 +109,7 @@ Profiler::wakeup() { // FIXME - avoid the repeated code - vector perProcCycleCount(m_num_of_sequencers); + vector perProcCycleCount(m_num_of_sequencers); for (int i = 0; i < m_num_of_sequencers; i++) { perProcCycleCount[i] = @@ -155,7 +155,7 @@ Profiler::setPeriodicStatsFile(const string& filename) } void -Profiler::setPeriodicStatsInterval(integer_t period) +Profiler::setPeriodicStatsInterval(int64_t period) { cout << "Recording periodic statistics every " << m_stats_period << " Ruby cycles" << endl; @@ -223,7 +223,7 @@ Profiler::printStats(ostream& out, bool short_stats) out << endl; } - vector perProcCycleCount(m_num_of_sequencers); + vector perProcCycleCount(m_num_of_sequencers); for (int i = 0; i < m_num_of_sequencers; i++) { perProcCycleCount[i] = @@ -419,7 +419,7 @@ Profiler::printResourceUsage(ostream& out) const out << "Resource Usage" << endl; out << "--------------" << endl; - integer_t pagesize = getpagesize(); // page size in bytes + int64_t pagesize = getpagesize(); // page size in bytes out << "page_size: " << pagesize << endl; rusage usage; diff --git a/src/mem/ruby/profiler/Profiler.hh b/src/mem/ruby/profiler/Profiler.hh index 58043dfaf..c83c4e37a 100644 --- a/src/mem/ruby/profiler/Profiler.hh +++ b/src/mem/ruby/profiler/Profiler.hh @@ -79,7 +79,7 @@ class Profiler : public SimObject void wakeup(); void setPeriodicStatsFile(const std::string& filename); - void setPeriodicStatsInterval(integer_t period); + void setPeriodicStatsInterval(int64_t period); void printStats(std::ostream& out, bool short_stats=false); void printShortStats(std::ostream& out) { printStats(out, true); } @@ -182,13 +182,13 @@ class Profiler : public SimObject std::vector m_cycles_executed_at_start; std::ostream* m_periodic_output_file_ptr; - integer_t m_stats_period; + int64_t m_stats_period; Time m_ruby_start; time_t m_real_time_start_time; - std::vector > m_busyControllerCount; - integer_t m_busyBankCount; + std::vector > m_busyControllerCount; + int64_t m_busyBankCount; Histogram m_multicast_retry_histogram; Histogram m_filter_action_histogram; -- 2.30.2