0

I had always done with an m5 checkpoint m5op + fs.py -r. I then also learned that fs.py has --take-checkpoints which can select the tick.

But today I needed to do it for an integration Linux boot test (tests/gem5/fs/linux/arm/run.py) to start running closer to the point of interest, and I don't want to modify the kernel to add the m5op + the runner script does not have -r/--take-checkpoint options. I wish this stuff were gem5.opt options available to all runs rather Python script options, but they're not.

Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44

1 Answers1

0

On gem5 71b450fc46ca5888971acf3160b813bf24784604 the script original script does:

m5.instantiate()
exit_event = m5.simulate()

so to take the checkpoint I can hack it to:

m5.instantiate()
# Run up to desired tick.
exit_event = m5.simulate(100000)
m5.checkpoint('m5out/mycpt')

and to restore hack it to:

m5.instantiate('m5out/mycpt')
exit_event = m5.simulate()
m5.checkpoint()
Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44