util: make a generic checkpoint aggregator that can aggregate different cpts into one multi-programmed cpt. Make minor changes to serialization/unserialization to get it to work properly. Note that checkpoints were made with a comment at the beginning with // - this must be changed to ## to work properly with the python config parser in the aggregator.
This commit is contained in:
@@ -222,6 +222,16 @@ PageTable::unserialize(Checkpoint *cp, const std::string §ion)
|
||||
entry->unserialize(cp, csprintf("%s.Entry%d", process->name(), i));
|
||||
pTable[vaddr] = *entry;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
process->M5_pid = pTable[vaddr].asn;
|
||||
|
||||
#if THE_ISA == ALPHA_ISA
|
||||
// The IPR_DTB_ASN misc reg must be set in Alpha for the tlb to work
|
||||
// correctly
|
||||
int id = process->contextIds[0];
|
||||
ThreadContext *tc = process->system->getThreadContext(id);
|
||||
tc->setMiscRegNoEffect(IPR_DTB_ASN, process->M5_pid << 57);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ Serializable::serializeAll(const string &cpt_dir)
|
||||
time_t t = time(NULL);
|
||||
if (!outstream.is_open())
|
||||
fatal("Unable to open file %s for writing\n", cpt_file.c_str());
|
||||
outstream << "// checkpoint generated: " << ctime(&t);
|
||||
outstream << "## checkpoint generated: " << ctime(&t);
|
||||
|
||||
globals.serialize(outstream);
|
||||
SimObject::serializeAll(outstream);
|
||||
|
||||
Reference in New Issue
Block a user