From: Giacomo Travaglini Date: Thu, 19 Jul 2018 16:08:49 +0000 (+0100) Subject: cpu: Warn when (un)serializing a traffic generator X-Git-Tag: v19.0.0.0~1974 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=045c484e0d69b5601b1681683fe3ba2d04b05bb6;p=gem5.git cpu: Warn when (un)serializing a traffic generator When checkpointing a system with a traffic generator, a warning is produced so that the user is reminded serialization does not keep all the traffic generator internal state. Change-Id: I3c49c912c9ff3a4208f55b2da0a88fc694147280 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/11831 Reviewed-by: Anthony Gutierrez Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- diff --git a/src/cpu/testers/traffic_gen/base.cc b/src/cpu/testers/traffic_gen/base.cc index 9ca084d17..41d005220 100644 --- a/src/cpu/testers/traffic_gen/base.cc +++ b/src/cpu/testers/traffic_gen/base.cc @@ -124,6 +124,9 @@ BaseTrafficGen::drain() void BaseTrafficGen::serialize(CheckpointOut &cp) const { + warn("%s serialization does not keep all traffic generator" + " internal state\n", name()); + DPRINTF(Checkpoint, "Serializing BaseTrafficGen\n"); // save ticks of the graph event if it is scheduled @@ -141,6 +144,9 @@ BaseTrafficGen::serialize(CheckpointOut &cp) const void BaseTrafficGen::unserialize(CheckpointIn &cp) { + warn("%s serialization does not restore all traffic generator" + " internal state\n", name()); + // restore scheduled events Tick nextEvent; UNSERIALIZE_SCALAR(nextEvent);