python: Recursively create checkpoint dir

While there was code present in "serialize.cc" to create the checkpoint
directory, it did not do recursively. This patch ensures all the
directories are created in a path to the checkpoint directory.

Change-Id: Ibcf7f800358fd89946f550b8cfb0cef8b51fceac
This commit is contained in:
Bobby R. Bruce
2023-09-11 15:25:16 -07:00
parent efd58f9b72
commit 6921d94373

View File

@@ -318,6 +318,10 @@ def checkpoint(dir):
drain()
memWriteback(root)
# Recursively create the checkpoint directory if it does not exist.
os.makedirs(dir, exist_ok=True)
print("Writing checkpoint")
_m5.core.serializeAll(dir)