diff options
author | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2014-04-25 12:36:16 +0100 |
---|---|---|
committer | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2014-04-25 12:36:16 +0100 |
commit | 435f4aec3d87238a72a61f5b3eea5334d4c955e7 (patch) | |
tree | 504a9794eb130585834d1b00e13787eb62e529d6 /src/mem/snoop_filter.hh | |
parent | afa2428eca9476cf63436dc138acafa36a1d408e (diff) | |
download | gem5-435f4aec3d87238a72a61f5b3eea5334d4c955e7.tar.xz |
mem: Add access statistics for the snoop filter
Adds a simple access counter for requests and snoops for the snoop filter and
also classifies hits based on whether a single other holder existed or whether
multiple shares held the line.
Diffstat (limited to 'src/mem/snoop_filter.hh')
-rwxr-xr-x | src/mem/snoop_filter.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mem/snoop_filter.hh b/src/mem/snoop_filter.hh index c1bb65dfc..88b534263 100755 --- a/src/mem/snoop_filter.hh +++ b/src/mem/snoop_filter.hh @@ -188,6 +188,8 @@ class SnoopFilter : public SimObject { return std::make_pair(empty , latency); } + virtual void regStats(); + protected: typedef uint64_t SnoopMask; /** @@ -227,6 +229,15 @@ class SnoopFilter : public SimObject { const unsigned linesize; /** Latency for doing a lookup in the filter */ const Cycles lookupLatency; + + /** Statistics */ + Stats::Scalar totRequests; + Stats::Scalar hitSingleRequests; + Stats::Scalar hitMultiRequests; + + Stats::Scalar totSnoops; + Stats::Scalar hitSingleSnoops; + Stats::Scalar hitMultiSnoops; }; inline SnoopFilter::SnoopMask |