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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user