mem-ruby: Minor Ruby Prefetcher fixes
Minor fixes to the Ruby stride prefetcher. This includes removing unused statistics and changing where/when some statistics are updated. Change-Id: If758bf009f53fad277cb3cd754d57a0b10737599 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24363 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Giacomo Travaglini
parent
de24aafc16
commit
2e5d0198d6
@@ -1,4 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2020 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
* not be construed as granting a license to any other intellectual
|
||||
* property including but not limited to intellectual property relating
|
||||
* to a hardware implementation of the functionality of the software
|
||||
* licensed hereunder. You may use the software subject to the license
|
||||
* terms below provided that you ensure that this notice is replicated
|
||||
* unmodified and in its entirety in all distributions of the software,
|
||||
* modified or unmodified, in source code or in binary form.
|
||||
*
|
||||
* Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -105,19 +117,9 @@ Prefetcher::regStats()
|
||||
.desc("number of prefetch requests made")
|
||||
;
|
||||
|
||||
numPrefetchAccepted
|
||||
.name(name() + ".prefetches_accepted")
|
||||
.desc("number of prefetch requests accepted")
|
||||
;
|
||||
|
||||
numDroppedPrefetches
|
||||
.name(name() + ".dropped_prefetches")
|
||||
.desc("number of prefetch requests dropped")
|
||||
;
|
||||
|
||||
numHits
|
||||
.name(name() + ".hits")
|
||||
.desc("number of prefetched blocks accessed")
|
||||
.desc("number of prefetched blocks accessed (for the first time)")
|
||||
;
|
||||
|
||||
numPartialHits
|
||||
@@ -157,7 +159,7 @@ Prefetcher::observeMiss(Addr address, const RubyRequestType& type)
|
||||
// The controller has issued the prefetch request,
|
||||
// but the request for the block arrived earlier.
|
||||
numPartialHits++;
|
||||
observePfHit(line_addr);
|
||||
observePfMiss(line_addr);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -242,16 +244,17 @@ Prefetcher::issueNextPrefetch(Addr address, PrefetchEntry *stream)
|
||||
|
||||
// possibly stop prefetching at page boundaries
|
||||
if (page_addr != pageAddress(line_addr)) {
|
||||
numPagesCrossed++;
|
||||
if (!m_prefetch_cross_pages) {
|
||||
// Deallocate the stream since we are not prefetching
|
||||
// across page boundries
|
||||
stream->m_is_valid = false;
|
||||
return;
|
||||
}
|
||||
numPagesCrossed++;
|
||||
}
|
||||
|
||||
// launch next prefetch
|
||||
numPrefetchRequested++;
|
||||
stream->m_address = line_addr;
|
||||
stream->m_use_time = m_controller->curCycle();
|
||||
DPRINTF(RubyPrefetcher, "Requesting prefetch for %#x\n", line_addr);
|
||||
@@ -308,12 +311,12 @@ Prefetcher::initializeStream(Addr address, int stride,
|
||||
line_addr = makeNextStrideAddress(line_addr, stride);
|
||||
// possibly stop prefetching at page boundaries
|
||||
if (page_addr != pageAddress(line_addr)) {
|
||||
numPagesCrossed++;
|
||||
if (!m_prefetch_cross_pages) {
|
||||
// deallocate this stream prefetcher
|
||||
mystream->m_is_valid = false;
|
||||
return;
|
||||
}
|
||||
numPagesCrossed++;
|
||||
}
|
||||
|
||||
// launch prefetch
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2020 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
* not be construed as granting a license to any other intellectual
|
||||
* property including but not limited to intellectual property relating
|
||||
* to a hardware implementation of the functionality of the software
|
||||
* licensed hereunder. You may use the software subject to the license
|
||||
* terms below provided that you ensure that this notice is replicated
|
||||
* unmodified and in its entirety in all distributions of the software,
|
||||
* modified or unmodified, in source code or in binary form.
|
||||
*
|
||||
* Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -166,7 +178,7 @@ class Prefetcher : public SimObject
|
||||
//! have been hit
|
||||
uint32_t *m_unit_filter_hit;
|
||||
|
||||
//! a negative nit stride filter array: helps reduce BW requirement
|
||||
//! a negative unit stride filter array: helps reduce BW requirement
|
||||
//! of prefetching
|
||||
std::vector<Addr> m_negative_filter;
|
||||
/// a round robin pointer into the negative filter group
|
||||
@@ -199,10 +211,6 @@ class Prefetcher : public SimObject
|
||||
Stats::Scalar numAllocatedStreams;
|
||||
//! Count of prefetch requests made
|
||||
Stats::Scalar numPrefetchRequested;
|
||||
//! Count of prefetch requests accepted
|
||||
Stats::Scalar numPrefetchAccepted;
|
||||
//! Count of prefetches dropped
|
||||
Stats::Scalar numDroppedPrefetches;
|
||||
//! Count of successful prefetches
|
||||
Stats::Scalar numHits;
|
||||
//! Count of partial successful prefetches
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
# Copyright (c) 2020 ARM Limited
|
||||
# All rights reserved.
|
||||
#
|
||||
# The license below extends only to copyright in the software and shall
|
||||
# not be construed as granting a license to any other intellectual
|
||||
# property including but not limited to intellectual property relating
|
||||
# to a hardware implementation of the functionality of the software
|
||||
# licensed hereunder. You may use the software subject to the license
|
||||
# terms below provided that you ensure that this notice is replicated
|
||||
# unmodified and in its entirety in all distributions of the software,
|
||||
# modified or unmodified, in source code or in binary form.
|
||||
#
|
||||
# Copyright (c) 2012 Mark D. Hill and David A. Wood
|
||||
# All rights reserved.
|
||||
#
|
||||
@@ -37,7 +49,6 @@ class Prefetcher(SimObject):
|
||||
|
||||
num_streams = Param.UInt32(4,
|
||||
"Number of prefetch streams to be allocated")
|
||||
pf_per_stream = Param.UInt32(1, "Number of prefetches per stream")
|
||||
unit_filter = Param.UInt32(8,
|
||||
"Number of entries in the unit filter array")
|
||||
nonunit_filter = Param.UInt32(8,
|
||||
|
||||
Reference in New Issue
Block a user