diff --git a/index.html b/index.html
index 2e74972..2c6b5a2 100644
--- a/index.html
+++ b/index.html
@@ -18308,7 +18308,9 @@ m5 dumpstats
# Boot, checkpoint and exit.
printf 'echo "setup run";m5 exit' > "$(./getvar gem5_readfile_file)"
-./run --emulator gem5 --eval 'm5 checkpoint;m5 readfile > a.sh;sh a.sh'
+./run --emulator gem5 --eval 'm5 checkpoint;m5 readfile > /tmp/gem5.sh && sh /tmp/gem5.sh'
# Restore and run the first benchmark.
printf 'echo "first benchmark";m5 exit' > "$(./getvar gem5_readfile_file)"
@@ -19051,18 +19053,73 @@ printf 'sh' > "$(./getvar gem5_readfile_file)"
-
-
rootfs_overlay/lkmc/gem5.sh. This script is analogous to gem5’s in-tree hack_back_ckpt.rcS, but with less noise.
+./run --gem5-readfile is a convenient way to set the m5 readfile file contents from a string in the command line, e.g.:
+
+
+
# Boot, checkpoint and exit.
+./run --emulator gem5 --eval './gem5.sh' --gem5-readfile 'echo "setup run"'
+
+# Restore and run the first benchmark.
+./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "first benchmark"'
+
+# Restore and run the second benchmark.
+./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "second benchmark"'
+
+
-
-
./run --gem5-readfile is a convenient way to set the m5 readfile
+rootfs_overlay/lkmc/gem5.sh. This script is analogous to gem5’s in-tree hack_back_ckpt.rcS, but with less noise.
+
+
+
+
# Boot, checkpoint and exit.
+./run --emulator gem5 --eval './gem5.sh' --gem5-readfile 'echo "setup run"'
+
+# Restore and run the first benchmark.
+./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "first benchmark"'
+
+# Restore and run the second benchmark.
+./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "second benchmark"'
+
+
-
Other loophole possibilities include:
+
If you forgot to use an appropriate --eval for your boot and the simulation is already running, rootfs_overlay/lkmc/gem5.sh can be used directly from an interactive guest shell.
+
+
+
First we reset the readfile to something that runs quickly:
+
+
+
+
printf 'echo "first benchmark"' > "$(./getvar gem5_readfile_file)"
+
+
+
+
and then in the guest, take a checkpoint and exit:
+
+
+
+
Now the guest is in a state where readfile will be executed automatically without interactive intervention:
+
+
+
+
./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "first benchmark"'
+./run --emulator gem5 --gem5-restore 1 --gem5-readfile 'echo "second benchmark"'
+
+
+
+
Other loophole possibilities to execute different benchmarks non-interactively include:
@@ -19931,18 +19988,7 @@ clock=500
By default, we use configs/example/fs.py script.
-
The --gem5-script biglittle option enables the alternative configs/example/arm/fs_bigLITTLE.py script instead.
-
-
-
-
-
patch -d "$(./getvar gem5_source_dir)" -p 1 < patches/manual/gem5-biglittle.patch
-
-
-
-
then:
+
The --gem5-script biglittle option enables the alternative configs/example/arm/fs_bigLITTLE.py script instead:
@@ -20807,6 +20853,17 @@ exec filecode in scope
TODO: the file path name appears to be passed as a command line argument to the Python script, but I didn’t have the patience to fully understand the details.
+
The Python config files then set the entire system up in Python, and finally call m5.simulate() to run the actual simulation. This function has a C++ native implementation at:
+
+
+
+
and that is where doSimLoop the main event loop, doSimLoop gets called and starts kicking off the gem5 event queue.
+
+
Tested at gem5 b4879ae5b0b6644e6836b0881e4da05c64a6550d.