Huang Jiasen has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/54163 )

Change subject: mem-cache: Added stats filtering both useful and spanPage prefetch.
......................................................................

mem-cache: Added stats filtering both useful and spanPage prefetch.

Change-Id: I2570ee47f064ac999f2dcc813c9e39174a2ad8af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54163
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/mem/cache/prefetch/queued.cc
M src/mem/cache/prefetch/queued.hh
2 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  kokoro: Regressions pass




diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc
index 597c88a..da9cbf4 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -210,6 +210,10 @@

         if (!samePage(addr_prio.first, pfi.getAddr())) {
             statsQueued.pfSpanPage += 1;
+
+            if (hasBeenPrefetched(pkt->getAddr(), pkt->isSecure())) {
+                statsQueued.pfUsefulSpanPage += 1;
+            }
         }

         bool can_cross_page = (tlb != nullptr);
@@ -272,7 +276,9 @@
     ADD_STAT(pfRemovedFull, statistics::units::Count::get(),
              "number of prefetches dropped due to prefetch queue size"),
     ADD_STAT(pfSpanPage, statistics::units::Count::get(),
-             "number of prefetches that crossed the page")
+             "number of prefetches that crossed the page"),
+    ADD_STAT(pfUsefulSpanPage, statistics::units::Count::get(),
+             "number of prefetches that is useful and crossed the page")
 {
 }

diff --git a/src/mem/cache/prefetch/queued.hh b/src/mem/cache/prefetch/queued.hh
index 1062630..c769b38 100644
--- a/src/mem/cache/prefetch/queued.hh
+++ b/src/mem/cache/prefetch/queued.hh
@@ -185,6 +185,7 @@
         statistics::Scalar pfRemovedDemand;
         statistics::Scalar pfRemovedFull;
         statistics::Scalar pfSpanPage;
+        statistics::Scalar pfUsefulSpanPage;
     } statsQueued;
   public:
     using AddrPriority = std::pair<Addr, int32_t>;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/54163
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2570ee47f064ac999f2dcc813c9e39174a2ad8af
Gerrit-Change-Number: 54163
Gerrit-PatchSet: 7
Gerrit-Owner: Huang Jiasen <jiasen....@alibaba-inc.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Huang Jiasen <jiasen....@alibaba-inc.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to