|
gem5
|
#include "sim/serialize.hh"#include <sys/stat.h>#include <sys/time.h>#include <sys/types.h>#include <cerrno>#include <fstream>#include <list>#include <string>#include <vector>#include "base/framebuffer.hh"#include "base/inifile.hh"#include "base/misc.hh"#include "base/output.hh"#include "base/str.hh"#include "base/trace.hh"#include "debug/Checkpoint.hh"#include "sim/eventq.hh"#include "sim/sim_events.hh"#include "sim/sim_exit.hh"#include "sim/sim_object.hh"#include "sim/stat_control.hh"Go to the source code of this file.
Classes | |
| class | Globals |
| Container for serializing global variables (not associated with any serialized object). More... | |
Macros | |
| #define | INSTANTIATE_PARAM_TEMPLATES(type) |
Functions | |
| template<class T > | |
| bool | parseParam (const string &s, T &value) |
| template<class T > | |
| void | showParam (CheckpointOut &os, const T &value) |
| template<> | |
| void | showParam (CheckpointOut &os, const char &value) |
| template<> | |
| void | showParam (CheckpointOut &os, const signed char &value) |
| template<> | |
| void | showParam (CheckpointOut &os, const unsigned char &value) |
| template<> | |
| bool | parseParam (const string &s, float &value) |
| template<> | |
| bool | parseParam (const string &s, double &value) |
| template<> | |
| bool | parseParam (const string &s, bool &value) |
| template<> | |
| void | showParam (CheckpointOut &os, const bool &value) |
| template<> | |
| bool | parseParam (const string &s, string &value) |
| template<class T > | |
| void | paramOut (CheckpointOut &os, const string &name, const T ¶m) |
| template<class T > | |
| void | arrayParamOut (CheckpointOut &os, const string &name, const vector< T > ¶m) |
| template<class T > | |
| void | arrayParamOut (CheckpointOut &os, const string &name, const list< T > ¶m) |
| template<class T > | |
| void | arrayParamOut (CheckpointOut &os, const string &name, const set< T > ¶m) |
| template<class T > | |
| void | paramIn (CheckpointIn &cp, const string &name, T ¶m) |
| template<class T > | |
| bool | optParamIn (CheckpointIn &cp, const string &name, T ¶m, bool warn) |
| template<class T > | |
| void | arrayParamOut (CheckpointOut &os, const string &name, const T *param, unsigned size) |
| template<class T > | |
| void | arrayParamIn (CheckpointIn &cp, const string &name, T *param, unsigned size) |
| template<class T > | |
| void | arrayParamIn (CheckpointIn &cp, const string &name, vector< T > ¶m) |
| template<class T > | |
| void | arrayParamIn (CheckpointIn &cp, const string &name, list< T > ¶m) |
| template<class T > | |
| void | arrayParamIn (CheckpointIn &cp, const string &name, set< T > ¶m) |
| void | objParamIn (CheckpointIn &cp, const string &name, SimObject *¶m) |
| template void | arrayParamOut (CheckpointOut &, const string &, const set< string > &) |
| template void | arrayParamIn (CheckpointIn &, const string &, set< string > &) |
| void | debug_serialize (const string &cpt_dir) |
Variables | |
| Globals | globals |
| The one and only instance of the Globals class. More... | |
| std::set< std::string > | version_tags |
| The version tags for this build of the simulator, to be stored in the Globals section during serialization and compared upon unserialization. More... | |
| #define INSTANTIATE_PARAM_TEMPLATES | ( | type | ) |
Definition at line 431 of file serialize.cc.
| void arrayParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| T * | param, | ||
| unsigned | size | ||
| ) |
Definition at line 276 of file serialize.cc.
References Serializable::currentSection(), fatal, CheckpointIn::find(), ArmISA::i, parseParam(), X86ISA::size(), and tokenize().
Referenced by Globals::unserialize().
| void arrayParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| vector< T > & | param | ||
| ) |
Definition at line 320 of file serialize.cc.
References Serializable::currentSection(), fatal, CheckpointIn::find(), ArmISA::i, parseParam(), and tokenize().
| void arrayParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| list< T > & | param | ||
| ) |
Definition at line 362 of file serialize.cc.
References Serializable::currentSection(), fatal, CheckpointIn::find(), ArmISA::i, parseParam(), and tokenize().
| void arrayParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| set< T > & | param | ||
| ) |
Definition at line 392 of file serialize.cc.
References Serializable::currentSection(), fatal, CheckpointIn::find(), ArmISA::i, parseParam(), and tokenize().
| template void arrayParamIn | ( | CheckpointIn & | , |
| const string & | , | ||
| set< string > & | |||
| ) |
| void arrayParamOut | ( | CheckpointOut & | os, |
| const string & | name, | ||
| const vector< T > & | param | ||
| ) |
Definition at line 183 of file serialize.cc.
References ArmISA::i, showParam(), and X86ISA::size().
| void arrayParamOut | ( | CheckpointOut & | os, |
| const string & | name, | ||
| const list< T > & | param | ||
| ) |
Definition at line 198 of file serialize.cc.
References showParam().
| void arrayParamOut | ( | CheckpointOut & | os, |
| const string & | name, | ||
| const set< T > & | param | ||
| ) |
Definition at line 216 of file serialize.cc.
References showParam().
| void arrayParamOut | ( | CheckpointOut & | os, |
| const string & | name, | ||
| const T * | param, | ||
| unsigned | size | ||
| ) |
Definition at line 260 of file serialize.cc.
References ArmISA::i, showParam(), and X86ISA::size().
| template void arrayParamOut | ( | CheckpointOut & | , |
| const string & | , | ||
| const set< string > & | |||
| ) |
| void debug_serialize | ( | const string & | cpt_dir | ) |
Definition at line 646 of file serialize.cc.
References Serializable::serializeAll().
| void objParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| SimObject *& | param | ||
| ) |
Definition at line 422 of file serialize.cc.
References Serializable::currentSection(), fatal, and CheckpointIn::findObj().
| bool optParamIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| T & | param, | ||
| bool | warn | ||
| ) |
Definition at line 245 of file serialize.cc.
References Serializable::currentSection(), CheckpointIn::find(), parseParam(), and warn.
Referenced by EthPacketData::unserialize(), Random::unserialize(), EtherLink::Link::unserialize(), and Ticked::unserialize().
| void paramIn | ( | CheckpointIn & | cp, |
| const string & | name, | ||
| T & | param | ||
| ) |
Definition at line 234 of file serialize.cc.
References Serializable::currentSection(), fatal, CheckpointIn::find(), and parseParam().
Referenced by Globals::unserialize().
| void paramOut | ( | CheckpointOut & | os, |
| const string & | name, | ||
| const T & | param | ||
| ) |
Definition at line 174 of file serialize.cc.
References showParam().
Referenced by Globals::serialize().
| bool parseParam | ( | const string & | s, |
| T & | value | ||
| ) |
Definition at line 83 of file serialize.cc.
References to_number().
Referenced by arrayParamIn(), optParamIn(), and paramIn().
| bool parseParam | ( | const string & | s, |
| float & | value | ||
| ) |
Definition at line 130 of file serialize.cc.
References to_number().
| bool parseParam | ( | const string & | s, |
| double & | value | ||
| ) |
Definition at line 137 of file serialize.cc.
References to_number().
| bool parseParam | ( | const string & | s, |
| bool & | value | ||
| ) |
Definition at line 144 of file serialize.cc.
References to_bool().
| bool parseParam | ( | const string & | s, |
| string & | value | ||
| ) |
Definition at line 161 of file serialize.cc.
References ArmISA::s.
| void showParam | ( | CheckpointOut & | os, |
| const T & | value | ||
| ) |
Definition at line 90 of file serialize.cc.
Referenced by arrayParamOut(), and paramOut().
| void showParam | ( | CheckpointOut & | os, |
| const char & | value | ||
| ) |
Definition at line 106 of file serialize.cc.
| void showParam | ( | CheckpointOut & | os, |
| const signed char & | value | ||
| ) |
Definition at line 114 of file serialize.cc.
| void showParam | ( | CheckpointOut & | os, |
| const unsigned char & | value | ||
| ) |
Definition at line 122 of file serialize.cc.
| void showParam | ( | CheckpointOut & | os, |
| const bool & | value | ||
| ) |
Definition at line 152 of file serialize.cc.
| Globals globals |
The one and only instance of the Globals class.
Definition at line 498 of file serialize.cc.
Referenced by py_interact(), Serializable::serializeAll(), and Serializable::unserializeGlobals().
| std::set<std::string> version_tags |
The version tags for this build of the simulator, to be stored in the Globals section during serialization and compared upon unserialization.
Referenced by Globals::serialize(), and Globals::unserialize().