* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Erik Hallnor
+ * Authors: Nathan Binkert
+ * Erik Hallnor
* Steve Reinhardt
*/
#include <map>
#include "sim/host.hh"
-#include "sim/configfile.hh"
+class IniFile;
class Serializable;
class Checkpoint;
static int ckptCount;
static int ckptMaxCount;
static int ckptPrevCount;
- static void serializeAll();
+ static void serializeAll(const std::string &cpt_dir);
+ static void unserializeAll(const std::string &cpt_dir);
static void unserializeGlobals(Checkpoint *cp);
};
// an optional config hierarchy node (specified by the third
// argument). A pointer to the new SerializableBuilder is returned.
typedef Serializable *(*CreateFunc)(Checkpoint *cp,
- const std::string §ion);
+ const std::string §ion);
static std::map<std::string,CreateFunc> *classMap;
// create Serializable given name of class and pointer to
// configuration hierarchy node
static Serializable *createObject(Checkpoint *cp,
- const std::string §ion);
+ const std::string §ion);
};
//
SerializableClass the##OBJ_CLASS##Class(CLASS_NAME, \
OBJ_CLASS::createForUnserialize);
+void
+setCheckpointDir(const std::string &name);
+
class Checkpoint
{
private:
IniFile *db;
const std::string basePath;
- const ConfigNode *configNode;
std::map<std::string, Serializable*> objMap;
public:
- Checkpoint(const std::string &cpt_dir, const std::string &path,
- const ConfigNode *_configNode);
+ Checkpoint(const std::string &cpt_dir, const std::string &path);
const std::string cptDir;
// Filename for base checkpoint file within directory.
static const char *baseFilename;
-
- // Set up a checkpoint creation event or series of events.
- static void setup(Tick when, Tick period = 0);
};
#endif // __SERIALIZE_HH__