sim,util: Remove event dependencies from serialize.hh
With this change serialize.hh is no longer responsible for the (un)serialization of events. As a general rule, rules to (un)serialize non-basic types should be defined at the file that introduces that type. Therefore, (UN)SERIALIZE_EVENT have been moved to eventq.hh. Globals has a single instance which must be serialized and unserialized. Instead of having a stray global variable handled by Serialization, we pass its management to Root. As a side effect, Globals is assigned its own files: sim/globals.(cc/hh). Finally, 'unserializeGlobals()' is removed, so that Root can fully handle Globals' serialization. This breaks checkpoint compatibility, so a checkpoint upgrader is added. Change-Id: I9c8e57306f83f9cc30ab2b745a4972755191bec4 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43586 Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
c493d2c4ad
commit
19c7429520
@@ -308,7 +308,6 @@ pybind_init_core(py::module_ &m_native)
|
||||
*/
|
||||
m_core
|
||||
.def("serializeAll", &Serializable::serializeAll)
|
||||
.def("unserializeGlobals", &Serializable::unserializeGlobals)
|
||||
.def("getCheckpoint", [](const std::string &cpt_dir) {
|
||||
SimObject::setSimObjectResolver(&pybindSimObjectResolver);
|
||||
return new CheckpointIn(cpt_dir);
|
||||
|
||||
Reference in New Issue
Block a user