Skip to content

Commit 22dda8f

Browse files
committed
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.
1 parent 38c3a7b commit 22dda8f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.adoc

+12-12
Original file line numberDiff line numberDiff line change
@@ -1136,15 +1136,15 @@ This method also allows us to keep run outputs in separate directories for later
11361136
produces two separate `m5out` directories:
11371137

11381138
....
1139-
less out/aarch64/gem5/default/0/m5out
1140-
less out/aarch64/gem5/default/1/m5out
1139+
less out/aarch64/gem5/0/m5out
1140+
less out/aarch64/gem5/1/m5out
11411141
....
11421142

11431143
and the gem5 host executable stdout and stderr can be found at:
11441144

11451145
....
1146-
less out/aarch64/gem5/default/0/termout.txt
1147-
less out/aarch64/gem5/default/1/termout.txt
1146+
less out/aarch64/gem5/0/termout.txt
1147+
less out/aarch64/gem5/1/termout.txt
11481148
....
11491149

11501150
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
70567056

70577057
....
70587058
./run -a aarch64 -E 'm5 exit' -g -T Exec
7059-
less out/aarch64/gem5/default/0/m5out/trace.txt
7059+
less out/aarch64/gem5/0/m5out/trace.txt
70607060
....
70617061

70627062
List all available debug flags:
@@ -7281,7 +7281,7 @@ Now you can play a fun little game with your friends:
72817281
To find out why your program is slow, a good first step is to have a look at the statistics for the run:
72827282

72837283
....
7284-
cat out/aarch64/gem5/default/0/m5out/stats.txt
7284+
cat out/aarch64/gem5/0/m5out/stats.txt
72857285
....
72867286

72877287
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
80718071
Host:
80728072

80738073
....
8074-
cat out/aarch64/gem5/default/0/m5out/myfilehost
8074+
cat out/aarch64/gem5/0/m5out/myfilehost
80758075
....
80768076

80778077
Does not work for subdirectories, gem5 crashes:
@@ -8313,7 +8313,7 @@ then:
83138313
Checkpoints can be restored with:
83148314

83158315
....
8316-
./run -aA -g -X-b -- --restore-from=out/aarch64/gem5/default/0/m5ou5/cpt.*
8316+
./run -aA -g -X-b -- --restore-from=out/aarch64/gem5/0/m5ou5/cpt.*
83178317
....
83188318

83198319
Advantages over `fs.py`:
@@ -8731,7 +8731,7 @@ cat ./out/arm/qemu/0/run.sh
87318731
or for gem5:
87328732

87338733
....
8734-
cat ./out/arm/gem5/default/0/run.sh
8734+
cat ./out/arm/gem5/0/run.sh
87358735
....
87368736

87378737
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`.
91479147
**** `out/<arch>/buildroot/build/linux-custom.<variant>`: what `linux-custom` points to
91489148
*** `out/<arch>/qemu`: QEMU runtime outputs
91499149
*** `out/<arch>/qemu/<run-id>/run.sh`: full CLI used to run QEMU. See: <<report-upstream-bugs>>
9150-
*** `out/<arch>/gem5/<gem5-variant>/<run-id>/`: gem5 runtime outputs
9151-
**** `out/<arch>/gem5/<gem5-variant>/<run-id>/m5out`
9152-
**** `out/<arch>/gem5/<gem5-variant>/<run-id>/run.sh`: full CLI used to run gem5. See: <<report-upstream-bugs>>
9150+
*** `out/<arch>/gem5/<run-id>/`: gem5 runtime outputs
9151+
**** `out/<arch>/gem5/<run-id>/m5out`
9152+
**** `out/<arch>/gem5/<run-id>/run.sh`: full CLI used to run gem5. See: <<report-upstream-bugs>>
91539153
** `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.
91549154
*** `out/common/dl/`: Buildroot caches downloaded source there due to `BR2_DL_DIR`
91559155
*** `out/common/gem5/`: `arm` and `aarch64` have the same build.

common

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ set_common_vars() {
8282
common_gem5_m5term="${common_gem5_out_dir}/m5term"
8383
common_gem5_build_dir="${common_gem5_out_dir}/build"
8484
common_gem5_system_dir="${common_gem5_out_dir}/system"
85-
common_gem5_run_dir="${out_arch_dir}/gem5/${gem5_variant}/${common_run_id}"
85+
common_gem5_run_dir="${out_arch_dir}/gem5/${common_run_id}"
8686
common_gem5_termout_file="${common_gem5_run_dir}/termout.txt"
8787
common_m5out_dir="${common_gem5_run_dir}/m5out"
8888
if "$gem5"; then

0 commit comments

Comments
 (0)