I like this idea a lot. Not only would it solve the SERIALIZE_* v. paramOut usage problem, but it would also decouple the code variable name from the name written to the checkpoint. If used intelligently, this could alleviate some of the pain of fixing old checkpoints when code changes.
Joel On Fri, Jan 21, 2011 at 12:57 AM, Gabe Black <gbl...@eecs.umich.edu> wrote: > From time to time It seems to be that we need to serialize something > but call it something other than its variable name. Would it make sense > to add SERIALIZE_*_AS macros that take a name argument as well? It's not > that hard to create a temporary variable or use those param functions > directly, but it would at least make things look more consistent to > always (or almost always) use SERIALIZE_FOO. > > Gabe > > On 01/20/11 22:11, Steve Reinhardt wrote: > > changeset 494b5426e70d in /z/repo/m5 > > details: http://repo.m5sim.org/m5?cmd=changeset;node=494b5426e70d > > description: > > checkpointing: fix bug from curTick accessor conversion. > > > > Regex replacement of curTick with curTick() accidentally > > changed checkpoint key string for serialization but not > > for unserialization. > > > > diffstat: > > > > src/sim/serialize.cc | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diffs (12 lines): > > > > diff -r f84bfd45d607 -r 494b5426e70d src/sim/serialize.cc > > --- a/src/sim/serialize.cc Wed Jan 19 16:22:23 2011 -0800 > > +++ b/src/sim/serialize.cc Thu Jan 20 22:13:33 2011 -0800 > > @@ -400,7 +400,7 @@ > > Globals::serialize(ostream &os) > > { > > nameOut(os); > > - SERIALIZE_SCALAR(curTick()); > > + paramOut(os, "curTick", curTick()); > > > > nameOut(os, "MainEventQueue"); > > mainEventQueue.serialize(os); > > _______________________________________________ > > m5-dev mailing list > > m5-dev@m5sim.org > > http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ > m5-dev mailing list > m5-dev@m5sim.org > http://m5sim.org/mailman/listinfo/m5-dev > -- Joel Hestness PhD Student, Computer Architecture Dept. of Computer Science, University of Texas - Austin http://www.cs.utexas.edu/~hestness
_______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev