Hoa Nguyen has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/39417 )

Change subject: learning-gem5: Add units to stats
......................................................................

learning-gem5: Add units to stats

Change-Id: Iaff6c19b0b87250d15f5afb0763680fafe782d52
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39417
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
---
M src/learning_gem5/part2/simple_cache.cc
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/learning_gem5/part2/simple_cache.cc b/src/learning_gem5/part2/simple_cache.cc
index 661cae5..788291f 100644
--- a/src/learning_gem5/part2/simple_cache.cc
+++ b/src/learning_gem5/part2/simple_cache.cc
@@ -423,11 +423,12 @@

 SimpleCache::SimpleCacheStats::SimpleCacheStats(Stats::Group *parent)
       : Stats::Group(parent),
-      ADD_STAT(hits, "Number of hits"),
-      ADD_STAT(misses, "Number of misses"),
-      ADD_STAT(missLatency, "Ticks for misses to the cache"),
-      ADD_STAT(hitRatio, "The ratio of hits to the total"
-                 "accesses to the cache", hits / (hits + misses))
+      ADD_STAT(hits, UNIT_COUNT, "Number of hits"),
+      ADD_STAT(misses, UNIT_COUNT, "Number of misses"),
+      ADD_STAT(missLatency, UNIT_TICK, "Ticks for misses to the cache"),
+      ADD_STAT(hitRatio, UNIT_RATIO,
+               "The ratio of hits to the total accesses to the cache",
+               hits / (hits + misses))
 {
     missLatency.init(16); // number of buckets
 }



The change was submitted with unreviewed changes in the following files:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39417
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: Iaff6c19b0b87250d15f5afb0763680fafe782d52
Gerrit-Change-Number: 39417
Gerrit-PatchSet: 21
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.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