From d7840d8388b6f5442b4c21aae5a978f8fb957b16 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Wed, 8 May 2019 12:11:36 +0200 Subject: [PATCH] mem-ruby: Remove Bloom Filter's print() Print was unused. As a side effect 'using namespace std' is no longer needed. Change-Id: Ief10cba1a11dfdd4edb7464eb9291fc83d6668cd Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18731 Maintainer: Nikos Nikoleris Tested-by: kokoro Reviewed-by: Nikos Nikoleris --- src/mem/ruby/filters/AbstractBloomFilter.hh | 4 ---- src/mem/ruby/filters/BlockBloomFilter.cc | 8 -------- src/mem/ruby/filters/BlockBloomFilter.hh | 3 --- src/mem/ruby/filters/BulkBloomFilter.cc | 8 -------- src/mem/ruby/filters/BulkBloomFilter.hh | 3 --- src/mem/ruby/filters/H3BloomFilter.cc | 8 -------- src/mem/ruby/filters/H3BloomFilter.hh | 2 -- src/mem/ruby/filters/LSB_CountingBloomFilter.cc | 7 ------- src/mem/ruby/filters/LSB_CountingBloomFilter.hh | 3 --- src/mem/ruby/filters/MultiBitSelBloomFilter.cc | 8 -------- src/mem/ruby/filters/MultiBitSelBloomFilter.hh | 2 -- src/mem/ruby/filters/MultiGrainBloomFilter.cc | 8 -------- src/mem/ruby/filters/MultiGrainBloomFilter.hh | 3 --- src/mem/ruby/filters/NonCountingBloomFilter.cc | 7 ------- src/mem/ruby/filters/NonCountingBloomFilter.hh | 3 --- 15 files changed, 77 deletions(-) diff --git a/src/mem/ruby/filters/AbstractBloomFilter.hh b/src/mem/ruby/filters/AbstractBloomFilter.hh index 6da4a9d53..bdf7c6323 100644 --- a/src/mem/ruby/filters/AbstractBloomFilter.hh +++ b/src/mem/ruby/filters/AbstractBloomFilter.hh @@ -29,8 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_ABSTRACTBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_ABSTRACTBLOOMFILTER_HH__ -#include - #include "mem/ruby/common/Address.hh" class AbstractBloomFilter @@ -54,8 +52,6 @@ class AbstractBloomFilter virtual int getCount(Addr addr) = 0; virtual int getTotalCount() = 0; - virtual void print(std::ostream& out) const = 0; - virtual int getIndex(Addr addr) = 0; virtual int readBit(const int index) = 0; virtual void writeBit(const int index, const int value) = 0; diff --git a/src/mem/ruby/filters/BlockBloomFilter.cc b/src/mem/ruby/filters/BlockBloomFilter.cc index 262ca8bab..e990497d0 100644 --- a/src/mem/ruby/filters/BlockBloomFilter.cc +++ b/src/mem/ruby/filters/BlockBloomFilter.cc @@ -29,11 +29,8 @@ #include "mem/ruby/filters/BlockBloomFilter.hh" #include "base/intmath.hh" -#include "base/str.hh" #include "mem/ruby/system/RubySystem.hh" -using namespace std; - BlockBloomFilter::BlockBloomFilter(int size) { m_filter_size = size; @@ -108,11 +105,6 @@ BlockBloomFilter::getIndex(Addr addr) return get_index(addr); } -void -BlockBloomFilter::print(ostream& out) const -{ -} - int BlockBloomFilter::readBit(const int index) { diff --git a/src/mem/ruby/filters/BlockBloomFilter.hh b/src/mem/ruby/filters/BlockBloomFilter.hh index d015e1e0e..088759c5e 100644 --- a/src/mem/ruby/filters/BlockBloomFilter.hh +++ b/src/mem/ruby/filters/BlockBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_BLOCKBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_BLOCKBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -53,8 +52,6 @@ class BlockBloomFilter : public AbstractBloomFilter int readBit(const int index); void writeBit(const int index, const int value); - void print(std::ostream& out) const; - private: int get_index(Addr addr); diff --git a/src/mem/ruby/filters/BulkBloomFilter.cc b/src/mem/ruby/filters/BulkBloomFilter.cc index a7e02781f..d7fa1a388 100644 --- a/src/mem/ruby/filters/BulkBloomFilter.cc +++ b/src/mem/ruby/filters/BulkBloomFilter.cc @@ -31,11 +31,8 @@ #include #include "base/intmath.hh" -#include "base/str.hh" #include "mem/ruby/system/RubySystem.hh" -using namespace std; - BulkBloomFilter::BulkBloomFilter(int size) { m_filter_size = size; @@ -185,11 +182,6 @@ BulkBloomFilter::writeBit(const int index, const int value) // TODO } -void -BulkBloomFilter::print(ostream& out) const -{ -} - int BulkBloomFilter::get_index(Addr addr) { diff --git a/src/mem/ruby/filters/BulkBloomFilter.hh b/src/mem/ruby/filters/BulkBloomFilter.hh index 683bbe14c..a3df10530 100644 --- a/src/mem/ruby/filters/BulkBloomFilter.hh +++ b/src/mem/ruby/filters/BulkBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_BULKBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_BULKBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -52,8 +51,6 @@ class BulkBloomFilter : public AbstractBloomFilter int readBit(const int index); void writeBit(const int index, const int value); - void print(std::ostream& out) const; - private: int get_index(Addr addr); Addr permute(Addr addr); diff --git a/src/mem/ruby/filters/H3BloomFilter.cc b/src/mem/ruby/filters/H3BloomFilter.cc index 6fa182f9a..90b3546d9 100644 --- a/src/mem/ruby/filters/H3BloomFilter.cc +++ b/src/mem/ruby/filters/H3BloomFilter.cc @@ -29,9 +29,6 @@ #include "mem/ruby/filters/H3BloomFilter.hh" #include "base/intmath.hh" -#include "base/logging.hh" - -using namespace std; static int H3[64][16] = { { 33268410, 395488709, 311024285, 456111753, @@ -469,11 +466,6 @@ H3BloomFilter::getTotalCount() return count; } -void -H3BloomFilter::print(ostream& out) const -{ -} - int H3BloomFilter::get_index(Addr addr, int i) { diff --git a/src/mem/ruby/filters/H3BloomFilter.hh b/src/mem/ruby/filters/H3BloomFilter.hh index b9890e7b6..93dc7d373 100644 --- a/src/mem/ruby/filters/H3BloomFilter.hh +++ b/src/mem/ruby/filters/H3BloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_H3BLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_H3BLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -48,7 +47,6 @@ class H3BloomFilter : public AbstractBloomFilter bool isSet(Addr addr); int getCount(Addr addr); int getTotalCount(); - void print(std::ostream& out) const; int getIndex(Addr addr); int readBit(const int index); diff --git a/src/mem/ruby/filters/LSB_CountingBloomFilter.cc b/src/mem/ruby/filters/LSB_CountingBloomFilter.cc index 25e1dbfa8..98c480b4e 100644 --- a/src/mem/ruby/filters/LSB_CountingBloomFilter.cc +++ b/src/mem/ruby/filters/LSB_CountingBloomFilter.cc @@ -31,8 +31,6 @@ #include "base/intmath.hh" #include "mem/ruby/system/RubySystem.hh" -using namespace std; - LSB_CountingBloomFilter::LSB_CountingBloomFilter(int head, int tail) { m_filter_size = head; @@ -109,11 +107,6 @@ LSB_CountingBloomFilter::getIndex(Addr addr) return get_index(addr); } -void -LSB_CountingBloomFilter::print(ostream& out) const -{ -} - int LSB_CountingBloomFilter::readBit(const int index) { diff --git a/src/mem/ruby/filters/LSB_CountingBloomFilter.hh b/src/mem/ruby/filters/LSB_CountingBloomFilter.hh index 03602a381..11df169dd 100644 --- a/src/mem/ruby/filters/LSB_CountingBloomFilter.hh +++ b/src/mem/ruby/filters/LSB_CountingBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_LSB_COUNTINGBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_LSB_COUNTINGBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -53,8 +52,6 @@ class LSB_CountingBloomFilter : public AbstractBloomFilter int readBit(const int index); void writeBit(const int index, const int value); - void print(std::ostream& out) const; - private: int get_index(Addr addr); diff --git a/src/mem/ruby/filters/MultiBitSelBloomFilter.cc b/src/mem/ruby/filters/MultiBitSelBloomFilter.cc index 3dc392f8b..206e5b07a 100644 --- a/src/mem/ruby/filters/MultiBitSelBloomFilter.cc +++ b/src/mem/ruby/filters/MultiBitSelBloomFilter.cc @@ -31,9 +31,6 @@ #include #include "base/intmath.hh" -#include "base/logging.hh" - -using namespace std; MultiBitSelBloomFilter::MultiBitSelBloomFilter(std::size_t filter_size, int num_hashes, int skip_bits, bool is_parallel) @@ -124,11 +121,6 @@ MultiBitSelBloomFilter::getTotalCount() return count; } -void -MultiBitSelBloomFilter::print(ostream& out) const -{ -} - int MultiBitSelBloomFilter::get_index(Addr addr, int i) { diff --git a/src/mem/ruby/filters/MultiBitSelBloomFilter.hh b/src/mem/ruby/filters/MultiBitSelBloomFilter.hh index 1f652b2a4..94ec38d38 100644 --- a/src/mem/ruby/filters/MultiBitSelBloomFilter.hh +++ b/src/mem/ruby/filters/MultiBitSelBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_MULTIBITSELBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_MULTIBITSELBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -50,7 +49,6 @@ class MultiBitSelBloomFilter : public AbstractBloomFilter bool isSet(Addr addr); int getCount(Addr addr); int getTotalCount(); - void print(std::ostream& out) const; int getIndex(Addr addr); int readBit(const int index); diff --git a/src/mem/ruby/filters/MultiGrainBloomFilter.cc b/src/mem/ruby/filters/MultiGrainBloomFilter.cc index fef8fa820..a4de7a7af 100644 --- a/src/mem/ruby/filters/MultiGrainBloomFilter.cc +++ b/src/mem/ruby/filters/MultiGrainBloomFilter.cc @@ -29,11 +29,8 @@ #include "mem/ruby/filters/MultiGrainBloomFilter.hh" #include "base/intmath.hh" -#include "base/str.hh" #include "mem/ruby/system/RubySystem.hh" -using namespace std; - MultiGrainBloomFilter::MultiGrainBloomFilter(int head, int tail) { // head contains size of 1st bloom filter, tail contains size of @@ -134,11 +131,6 @@ MultiGrainBloomFilter::writeBit(const int index, const int value) // TODO } -void -MultiGrainBloomFilter::print(ostream& out) const -{ -} - int MultiGrainBloomFilter::get_block_index(Addr addr) { diff --git a/src/mem/ruby/filters/MultiGrainBloomFilter.hh b/src/mem/ruby/filters/MultiGrainBloomFilter.hh index c2329273f..3be6ff640 100644 --- a/src/mem/ruby/filters/MultiGrainBloomFilter.hh +++ b/src/mem/ruby/filters/MultiGrainBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_MULTIGRAINBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_MULTIGRAINBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -52,8 +51,6 @@ class MultiGrainBloomFilter : public AbstractBloomFilter int readBit(const int index); void writeBit(const int index, const int value); - void print(std::ostream& out) const; - private: int get_block_index(Addr addr); int get_page_index(Addr addr); diff --git a/src/mem/ruby/filters/NonCountingBloomFilter.cc b/src/mem/ruby/filters/NonCountingBloomFilter.cc index ca1cbab01..f012a7249 100644 --- a/src/mem/ruby/filters/NonCountingBloomFilter.cc +++ b/src/mem/ruby/filters/NonCountingBloomFilter.cc @@ -32,8 +32,6 @@ #include "base/str.hh" #include "mem/ruby/system/RubySystem.hh" -using namespace std; - NonCountingBloomFilter::NonCountingBloomFilter(int head, int tail) { // head contains filter size, tail contains bit offset from block number @@ -106,11 +104,6 @@ NonCountingBloomFilter::getTotalCount() return count; } -void -NonCountingBloomFilter::print(ostream& out) const -{ -} - int NonCountingBloomFilter::getIndex(Addr addr) { diff --git a/src/mem/ruby/filters/NonCountingBloomFilter.hh b/src/mem/ruby/filters/NonCountingBloomFilter.hh index 9d1ad0067..2f1885d8d 100644 --- a/src/mem/ruby/filters/NonCountingBloomFilter.hh +++ b/src/mem/ruby/filters/NonCountingBloomFilter.hh @@ -29,7 +29,6 @@ #ifndef __MEM_RUBY_FILTERS_NONCOUNTINGBLOOMFILTER_HH__ #define __MEM_RUBY_FILTERS_NONCOUNTINGBLOOMFILTER_HH__ -#include #include #include "mem/ruby/common/Address.hh" @@ -54,8 +53,6 @@ class NonCountingBloomFilter : public AbstractBloomFilter int readBit(const int index); void writeBit(const int index, const int value); - void print(std::ostream& out) const; - int operator[](const int index) const { -- 2.30.2