You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Get an interactive shell at the end of the restore.
7435
-
printf '' > data/readfile
7436
-
./run -a "$arch" -g -l 1
7437
+
# Get an interactive shell at the end of the restore
7438
+
# if you need to debug something more interactively.
7439
+
printf 'sh' > data/readfile
7440
+
eval "${cmd} ${restore}"
7437
7441
....
7438
7442
7439
-
The commands output the approximate number of CPU cycles it took Dhrystone to run.
7443
+
The `gem5-stats` commands output the approximate number of CPU cycles it took Dhrystone to run.
7440
7444
7441
7445
For more serious tests, you will likely want to automate logging the commands ran and results to files, a good example is: link:gem5-bench-cache[].
7442
7446
@@ -7448,20 +7452,6 @@ A more naive and simpler to understand approach would be a direct:
7448
7452
7449
7453
but the problem is that this method does not allow to easily run a different script without running the boot again, see: <<gem5-restore-new-scrip>>
7450
7454
7451
-
A few imperfections of our benchmarking method are:
7452
-
7453
-
* when we do `m5 resetstats` and `m5 exit`, there is some time passed before the `exec` system call returns and the actual benchmark starts and ends
7454
-
* the benchmark outputs to stdout, which means so extra cycles in addition to the actual computation. But TODO: how to get the output to check that it is correct without such IO cycles?
7455
-
7456
-
Solutions to these problems include:
7457
-
7458
-
* modify benchmark code with instrumentation directly, see <<m5ops-instructions>> for an example.
7459
-
* monitor known addresses TODO possible? Create an example.
Those problems should be insignificant if the benchmark runs for long enough however.
7464
-
7465
7455
Now you can play a fun little game with your friends:
7466
7456
7467
7457
* pick a computational problem
@@ -7482,6 +7472,22 @@ Whenever we run `m5 dumpstats` or `m5 exit`, a section with the following format
7482
7472
---------- End Simulation Statistics ----------
7483
7473
....
7484
7474
7475
+
==== Skip extra benchmark instructions
7476
+
7477
+
A few imperfections of our <<gem5-run-benchmark,benchmarking method>> are:
7478
+
7479
+
* when we do `m5 resetstats` and `m5 exit`, there is some time passed before the `exec` system call returns and the actual benchmark starts and ends
7480
+
* the benchmark outputs to stdout, which means so extra cycles in addition to the actual computation. But TODO: how to get the output to check that it is correct without such IO cycles?
7481
+
7482
+
Solutions to these problems include:
7483
+
7484
+
* modify benchmark code with instrumentation directly, see <<m5ops-instructions>> for an example.
7485
+
* monitor known addresses TODO possible? Create an example.
0 commit comments