Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/24390 )

Change subject: arm: Don't checkpoint the SystemCounter's "_period" value.
......................................................................

arm: Don't checkpoint the SystemCounter's "_period" value.

This value is just a cached inverse of _freq and can be recalculated
easily once the checkpoint is restored. The actual value of _period
actually depends on the global resolution of time (ie how much time a
Tick represents), and so saving the value of _period is also not
technically correct, even though in practice that will very rarely
cause a problem.

Change-Id: I21e63ba25ac4e189417905e532981f3d80723f19
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24390
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/dev/arm/generic_timer.cc
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/dev/arm/generic_timer.cc b/src/dev/arm/generic_timer.cc
index 7c1f09a..3df8768 100644
--- a/src/dev/arm/generic_timer.cc
+++ b/src/dev/arm/generic_timer.cc
@@ -83,7 +83,6 @@
     SERIALIZE_SCALAR(_regCntkctl);
     SERIALIZE_SCALAR(_regCnthctl);
     SERIALIZE_SCALAR(_freq);
-    SERIALIZE_SCALAR(_period);
     SERIALIZE_SCALAR(_resetTick);
 }

@@ -97,7 +96,7 @@
     if (!UNSERIALIZE_OPT_SCALAR(_regCnthctl))
         _regCnthctl = 0;
     UNSERIALIZE_SCALAR(_freq);
-    UNSERIALIZE_SCALAR(_period);
+    _period = (1.0 / _freq) * SimClock::Frequency;
     UNSERIALIZE_SCALAR(_resetTick);
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24390
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: I21e63ba25ac4e189417905e532981f3d80723f19
Gerrit-Change-Number: 24390
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to