summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/prefetch/base.cc')
-rw-r--r--src/mem/cache/prefetch/base.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mem/cache/prefetch/base.cc b/src/mem/cache/prefetch/base.cc
index 0f9290186..834787db6 100644
--- a/src/mem/cache/prefetch/base.cc
+++ b/src/mem/cache/prefetch/base.cc
@@ -43,10 +43,10 @@
#include "mem/cache/base.hh"
#include "mem/request.hh"
-BasePrefetcher::BasePrefetcher(const BaseCacheParams *p)
- : size(p->prefetcher_size), pageStop(!p->prefetch_past_page),
- serialSquash(p->prefetch_serial_squash),
- onlyData(p->prefetch_data_accesses_only)
+BasePrefetcher::BasePrefetcher(const Params *p)
+ : SimObject(p), size(p->size), latency(p->latency), degree(p->degree),
+ useContextId(p->use_cpu_id), pageStop(!p->cross_pages),
+ serialSquash(p->serial_squash), onlyData(p->data_accesses_only)
{
}
@@ -55,54 +55,53 @@ BasePrefetcher::setCache(BaseCache *_cache)
{
cache = _cache;
blkSize = cache->getBlockSize();
- _name = cache->name() + "-pf";
}
void
-BasePrefetcher::regStats(const std::string &name)
+BasePrefetcher::regStats()
{
pfIdentified
- .name(name + ".prefetcher.num_hwpf_identified")
+ .name(name() + ".prefetcher.num_hwpf_identified")
.desc("number of hwpf identified")
;
pfMSHRHit
- .name(name + ".prefetcher.num_hwpf_already_in_mshr")
+ .name(name() + ".prefetcher.num_hwpf_already_in_mshr")
.desc("number of hwpf that were already in mshr")
;
pfCacheHit
- .name(name + ".prefetcher.num_hwpf_already_in_cache")
+ .name(name() + ".prefetcher.num_hwpf_already_in_cache")
.desc("number of hwpf that were already in the cache")
;
pfBufferHit
- .name(name + ".prefetcher.num_hwpf_already_in_prefetcher")
+ .name(name() + ".prefetcher.num_hwpf_already_in_prefetcher")
.desc("number of hwpf that were already in the prefetch queue")
;
pfRemovedFull
- .name(name + ".prefetcher.num_hwpf_evicted")
+ .name(name() + ".prefetcher.num_hwpf_evicted")
.desc("number of hwpf removed due to no buffer left")
;
pfRemovedMSHR
- .name(name + ".prefetcher.num_hwpf_removed_MSHR_hit")
+ .name(name() + ".prefetcher.num_hwpf_removed_MSHR_hit")
.desc("number of hwpf removed because MSHR allocated")
;
pfIssued
- .name(name + ".prefetcher.num_hwpf_issued")
+ .name(name() + ".prefetcher.num_hwpf_issued")
.desc("number of hwpf issued")
;
pfSpanPage
- .name(name + ".prefetcher.num_hwpf_span_page")
+ .name(name() + ".prefetcher.num_hwpf_span_page")
.desc("number of hwpf spanning a virtual page")
;
pfSquashed
- .name(name + ".prefetcher.num_hwpf_squashed_from_miss")
+ .name(name() + ".prefetcher.num_hwpf_squashed_from_miss")
.desc("number of hwpf that got squashed due to a miss "
"aborting calculation time")
;
@@ -276,3 +275,5 @@ BasePrefetcher::samePage(Addr a, Addr b)
{
return roundDown(a, TheISA::VMPageSize) == roundDown(b, TheISA::VMPageSize);
}
+
+