Restructured the gem5 backend:
- FailGem5Device is gone. - There are now changes directly made to the gem5 source. - Gem5Connector is a helper class that is compiled inside the gem5 context to workaround problems with gem5 header in fail. Things that are working: - BPSingleListener - MemAccessListener - Save and restore simulator state git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1820 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -1,35 +1,23 @@
|
||||
#include "Gem5Controller.hpp"
|
||||
|
||||
#include <fstream>
|
||||
#include "Gem5Connector.hpp"
|
||||
|
||||
#include "../Listener.hpp"
|
||||
|
||||
#include "sim/core.hh"
|
||||
#include "sim/sim_exit.hh"
|
||||
//#include "sim/root.hh"
|
||||
|
||||
namespace fail {
|
||||
|
||||
bool Gem5Controller::save(const std::string &path)
|
||||
{
|
||||
// Takes a snapshot in the m5out dir
|
||||
Tick when = curTick() + 1;
|
||||
exitSimLoop("checkpoint", 0, when, 0);
|
||||
|
||||
// This could be a version to take snapshots with a specified name
|
||||
/*Root* root = Root::root();
|
||||
connector.save(path);
|
||||
|
||||
std::ofstream file(path.c_str());
|
||||
root->serialize(file);
|
||||
file.close();*/
|
||||
return false; // TODO
|
||||
return true;
|
||||
}
|
||||
|
||||
void Gem5Controller::restore(const std::string &path)
|
||||
{
|
||||
|
||||
connector.restore(path);
|
||||
}
|
||||
|
||||
// TODO: Implement reboot
|
||||
void Gem5Controller::reboot()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user