mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: remove build variant from output directory
I noticed that it is not very elegant, since there are many other variants which are not included, e.g. Linux kernel build and random configs. Also it makes the path longer for something that is not the most common use case. Users can use run ID instead when they want separate output directories.
This commit is contained in:
24
README.adoc
24
README.adoc
@@ -1136,15 +1136,15 @@ This method also allows us to keep run outputs in separate directories for later
|
||||
produces two separate `m5out` directories:
|
||||
|
||||
....
|
||||
less out/aarch64/gem5/default/0/m5out
|
||||
less out/aarch64/gem5/default/1/m5out
|
||||
less out/aarch64/gem5/0/m5out
|
||||
less out/aarch64/gem5/1/m5out
|
||||
....
|
||||
|
||||
and the gem5 host executable stdout and stderr can be found at:
|
||||
|
||||
....
|
||||
less out/aarch64/gem5/default/0/termout.txt
|
||||
less out/aarch64/gem5/default/1/termout.txt
|
||||
less out/aarch64/gem5/0/termout.txt
|
||||
less out/aarch64/gem5/1/termout.txt
|
||||
....
|
||||
|
||||
Each line is prepended with the timestamp in seconds since the start of the program when it appeared.
|
||||
@@ -7056,7 +7056,7 @@ But it also provides a tracing mechanism documented at: link:http://www.gem5.org
|
||||
|
||||
....
|
||||
./run -a aarch64 -E 'm5 exit' -g -T Exec
|
||||
less out/aarch64/gem5/default/0/m5out/trace.txt
|
||||
less out/aarch64/gem5/0/m5out/trace.txt
|
||||
....
|
||||
|
||||
List all available debug flags:
|
||||
@@ -7281,7 +7281,7 @@ Now you can play a fun little game with your friends:
|
||||
To find out why your program is slow, a good first step is to have a look at the statistics for the run:
|
||||
|
||||
....
|
||||
cat out/aarch64/gem5/default/0/m5out/stats.txt
|
||||
cat out/aarch64/gem5/0/m5out/stats.txt
|
||||
....
|
||||
|
||||
Whenever we run `m5 dumpstats` or `m5 exit`, a section with the following format is added to that file:
|
||||
@@ -8071,7 +8071,7 @@ m5 writefile myfileguest myfilehost
|
||||
Host:
|
||||
|
||||
....
|
||||
cat out/aarch64/gem5/default/0/m5out/myfilehost
|
||||
cat out/aarch64/gem5/0/m5out/myfilehost
|
||||
....
|
||||
|
||||
Does not work for subdirectories, gem5 crashes:
|
||||
@@ -8313,7 +8313,7 @@ then:
|
||||
Checkpoints can be restored with:
|
||||
|
||||
....
|
||||
./run -aA -g -X-b -- --restore-from=out/aarch64/gem5/default/0/m5ou5/cpt.*
|
||||
./run -aA -g -X-b -- --restore-from=out/aarch64/gem5/0/m5ou5/cpt.*
|
||||
....
|
||||
|
||||
Advantages over `fs.py`:
|
||||
@@ -8731,7 +8731,7 @@ cat ./out/arm/qemu/0/run.sh
|
||||
or for gem5:
|
||||
|
||||
....
|
||||
cat ./out/arm/gem5/default/0/run.sh
|
||||
cat ./out/arm/gem5/0/run.sh
|
||||
....
|
||||
|
||||
Next, you will also want to give the relevant images to save them time. Zip the images with:
|
||||
@@ -9147,9 +9147,9 @@ The action seems to be happening at: `hw/arm/virt.c`.
|
||||
**** `out/<arch>/buildroot/build/linux-custom.<variant>`: what `linux-custom` points to
|
||||
*** `out/<arch>/qemu`: QEMU runtime outputs
|
||||
*** `out/<arch>/qemu/<run-id>/run.sh`: full CLI used to run QEMU. See: <<report-upstream-bugs>>
|
||||
*** `out/<arch>/gem5/<gem5-variant>/<run-id>/`: gem5 runtime outputs
|
||||
**** `out/<arch>/gem5/<gem5-variant>/<run-id>/m5out`
|
||||
**** `out/<arch>/gem5/<gem5-variant>/<run-id>/run.sh`: full CLI used to run gem5. See: <<report-upstream-bugs>>
|
||||
*** `out/<arch>/gem5/<run-id>/`: gem5 runtime outputs
|
||||
**** `out/<arch>/gem5/<run-id>/m5out`
|
||||
**** `out/<arch>/gem5/<run-id>/run.sh`: full CLI used to run gem5. See: <<report-upstream-bugs>>
|
||||
** `out/common`: cross arch outputs, for when we can gain a lot of time and space by sharing things that are common across different archs.
|
||||
*** `out/common/dl/`: Buildroot caches downloaded source there due to `BR2_DL_DIR`
|
||||
*** `out/common/gem5/`: `arm` and `aarch64` have the same build.
|
||||
|
||||
2
common
2
common
@@ -82,7 +82,7 @@ set_common_vars() {
|
||||
common_gem5_m5term="${common_gem5_out_dir}/m5term"
|
||||
common_gem5_build_dir="${common_gem5_out_dir}/build"
|
||||
common_gem5_system_dir="${common_gem5_out_dir}/system"
|
||||
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"
|
||||
common_gem5_run_dir="${out_arch_dir}/gem5/${common_run_id}"
|
||||
common_gem5_termout_file="${common_gem5_run_dir}/termout.txt"
|
||||
common_m5out_dir="${common_gem5_run_dir}/m5out"
|
||||
if "$gem5"; then
|
||||
|
||||
Reference in New Issue
Block a user