summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-10-29 21:45:39 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-10-29 21:45:39 -0800
commit5a1eb9049d16d37448282362529d462d73558181 (patch)
treefb1d5a05dad6869173a352abb16ddca7b3a1667f /dev
parent976429121c7fddbf8de18b2a347a53546fe14264 (diff)
downloadgem5-5a1eb9049d16d37448282362529d462d73558181.tar.xz
Support for Serializable non-SimObject things like events.
Can now serialize & unserialize DmaRequestEvents and DmaTransferEvents. Also support serialize/unserialize of pointers to SimObjects and other Serializable objects. arch/alpha/alpha_memory.cc: arch/alpha/alpha_memory.hh: arch/alpha/isa_traits.hh: cpu/exec_context.cc: cpu/exec_context.hh: cpu/simple_cpu/simple_cpu.hh: dev/alpha_access.h: dev/alpha_console.cc: dev/alpha_console.hh: dev/console.cc: dev/console.hh: unserialize() now takes a Checkpoint* instead of an IniFile*. cpu/simple_cpu/simple_cpu.cc: unserialize() now takes a Checkpoint* instead of an IniFile*. Put ExecContext in its own section so its _status fields doesn't conflict. sim/eventq.cc: sim/eventq.hh: unserialize() now takes a Checkpoint* instead of an IniFile*. Events get serialized by the event queue only if they're marked as AutoSerialize... others are assumed to be serialized by something else (e.g. an owning SimObject) or to not matter. sim/param.cc: Shift 'const' in case T is a ptr type. sim/serialize.cc: sim/serialize.hh: Define Checkpoint object to encapsulate everything you need to know about a checkpoint. Use it to allow lookups of named Serializable objects (and SimObjects) during unserialization. unserialize() now takes a Checkpoint* instead of an IniFile*. --HG-- extra : convert_revision : 8e6baab32405f8f548bb67a097b2f713296537a5
Diffstat (limited to 'dev')
-rw-r--r--dev/alpha_access.h4
-rw-r--r--dev/alpha_console.cc6
-rw-r--r--dev/alpha_console.hh2
-rw-r--r--dev/console.cc2
-rw-r--r--dev/console.hh2
5 files changed, 8 insertions, 8 deletions
diff --git a/dev/alpha_access.h b/dev/alpha_access.h
index c145fa2a3..eb551a359 100644
--- a/dev/alpha_access.h
+++ b/dev/alpha_access.h
@@ -44,7 +44,7 @@ typedef uint64_t UINT64;
#include <ostream>
#include <string>
-class IniFile;
+class Checkpoint;
#endif
@@ -82,7 +82,7 @@ struct AlphaAccess
#ifndef CONSOLE
void serialize(std::ostream &os);
- void unserialize(const IniFile *db, const std::string &section);
+ void unserialize(Checkpoint *cp, const std::string &section);
#endif
};
diff --git a/dev/alpha_console.cc b/dev/alpha_console.cc
index 969b1e4c3..6fe57edb5 100644
--- a/dev/alpha_console.cc
+++ b/dev/alpha_console.cc
@@ -188,7 +188,7 @@ AlphaAccess::serialize(ostream &os)
}
void
-AlphaAccess::unserialize(const IniFile *db, const std::string &section)
+AlphaAccess::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(last_offset);
UNSERIALIZE_SCALAR(version);
@@ -216,9 +216,9 @@ AlphaConsole::serialize(ostream &os)
}
void
-AlphaConsole::unserialize(const IniFile *db, const std::string &section)
+AlphaConsole::unserialize(Checkpoint *cp, const std::string &section)
{
- alphaAccess->unserialize(db, section);
+ alphaAccess->unserialize(cp, section);
}
BEGIN_DECLARE_SIM_OBJECT_PARAMS(AlphaConsole)
diff --git a/dev/alpha_console.hh b/dev/alpha_console.hh
index e4aeb2417..9e774773e 100644
--- a/dev/alpha_console.hh
+++ b/dev/alpha_console.hh
@@ -101,7 +101,7 @@ class AlphaConsole : public MmapDevice
* standard serialization routines for checkpointing
*/
virtual void serialize(std::ostream &os);
- virtual void unserialize(const IniFile *db, const std::string &section);
+ virtual void unserialize(Checkpoint *cp, const std::string &section);
};
#endif // __ALPHA_CONSOLE_HH__
diff --git a/dev/console.cc b/dev/console.cc
index 749add532..2378f8c75 100644
--- a/dev/console.cc
+++ b/dev/console.cc
@@ -319,7 +319,7 @@ SimConsole::serialize(ostream &os)
}
void
-SimConsole::unserialize(const IniFile *db, const std::string &section)
+SimConsole::unserialize(Checkpoint *cp, const std::string &section)
{
}
diff --git a/dev/console.hh b/dev/console.hh
index 6746f90b6..fd02e7a9a 100644
--- a/dev/console.hh
+++ b/dev/console.hh
@@ -129,7 +129,7 @@ class SimConsole : public SimObject
void setInt(int bits);
virtual void serialize(std::ostream &os);
- virtual void unserialize(const IniFile *db, const std::string &section);
+ virtual void unserialize(Checkpoint *cp, const std::string &section);
};
class ConsoleListener : public SimObject