From 96c999fe88a5f600a1a5ddf8c15eadba3051508b Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 18 Sep 2015 13:27:47 -0500 Subject: ruby: print addresses in hex Changeset 4872dbdea907 replaced Address by Addr, but did not make changes to print statements. So the addresses which were being printed in hex earlier along with their line address, were now being printed in decimals. This patch adds a function printAddress(Addr) that can be used to print the address in hex along with the lines address. This function has been put to use in some of the places. At other places, change has been made to print just the address in hex. --- src/mem/ruby/structures/Prefetcher.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mem/ruby/structures/Prefetcher.cc') diff --git a/src/mem/ruby/structures/Prefetcher.cc b/src/mem/ruby/structures/Prefetcher.cc index d12665ae9..ce6d36c04 100644 --- a/src/mem/ruby/structures/Prefetcher.cc +++ b/src/mem/ruby/structures/Prefetcher.cc @@ -135,7 +135,7 @@ Prefetcher::regStats() void Prefetcher::observeMiss(Addr address, const RubyRequestType& type) { - DPRINTF(RubyPrefetcher, "Observed miss for %s\n", address); + DPRINTF(RubyPrefetcher, "Observed miss for %#x\n", address); Addr line_addr = makeLineAddress(address); numMissObserved++; @@ -204,7 +204,7 @@ void Prefetcher::observePfMiss(Addr address) { numPartialHits++; - DPRINTF(RubyPrefetcher, "Observed partial hit for %s\n", address); + DPRINTF(RubyPrefetcher, "Observed partial hit for %#x\n", address); issueNextPrefetch(address, NULL); } @@ -212,7 +212,7 @@ void Prefetcher::observePfHit(Addr address) { numHits++; - DPRINTF(RubyPrefetcher, "Observed hit for %s\n", address); + DPRINTF(RubyPrefetcher, "Observed hit for %#x\n", address); issueNextPrefetch(address, NULL); } @@ -250,7 +250,7 @@ Prefetcher::issueNextPrefetch(Addr address, PrefetchEntry *stream) // launch next prefetch stream->m_address = line_addr; stream->m_use_time = m_controller->curCycle(); - DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr); + DPRINTF(RubyPrefetcher, "Requesting prefetch for %#x\n", line_addr); m_controller->enqueuePrefetch(line_addr, stream->m_type); } @@ -314,7 +314,7 @@ Prefetcher::initializeStream(Addr address, int stride, // launch prefetch numPrefetchRequested++; - DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr); + DPRINTF(RubyPrefetcher, "Requesting prefetch for %#x\n", line_addr); m_controller->enqueuePrefetch(line_addr, m_array[index].m_type); } -- cgit v1.2.3