arch-arm: Ensure counters keep events on checkpoint resume
authorJose Marinho <jose.marinho@arm.com>
Tue, 17 Oct 2017 15:39:54 +0000 (16:39 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 20 Nov 2017 17:35:52 +0000 (17:35 +0000)
Events were not being attached to counters after a checkpoint resume.
By not storing the enable private variable from the stored state the
recreation of the event to counter association is automatically carried.
The enable state is stored in the reg_pmcnten.

Change-Id: I46344df0882a9050c900efb2e8996d64dbfbf297
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5761
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/pmu.cc

index f1ff6cbbc93cb72202708264d683721f9932777d..baf0d19487f0a45c8c6b2be877853a8ba54990ae 100644 (file)
@@ -579,7 +579,6 @@ PMU::CounterState::serialize(CheckpointOut &cp) const
 {
     SERIALIZE_SCALAR(eventId);
     SERIALIZE_SCALAR(value);
-    SERIALIZE_SCALAR(enabled);
     SERIALIZE_SCALAR(overflow64);
 }
 
@@ -588,7 +587,6 @@ PMU::CounterState::unserialize(CheckpointIn &cp)
 {
     UNSERIALIZE_SCALAR(eventId);
     UNSERIALIZE_SCALAR(value);
-    UNSERIALIZE_SCALAR(enabled);
     UNSERIALIZE_SCALAR(overflow64);
 }