mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
gem5: automatically add build type to the build path
If you use it, you shall debug it, there is no basic user for gem5, so longer paths are worth it.
This commit is contained in:
10
README.adoc
10
README.adoc
@@ -10699,17 +10699,17 @@ This setup only creates gitignored worktrees of the private repository inside th
|
||||
The `gem5.debug` has optimizations turned off unlike the default `gem5.opt`, and provides a much better <<debug-the-emulator,debug experience>>:
|
||||
|
||||
....
|
||||
./build-gem5 --arch aarch64 --gem5-build-id debug --gem5-build-type debug
|
||||
./run --arch aarch64 --debug-vm --gem5 --gem5-build-id debug --gem5-build-type debug
|
||||
./build-gem5 --arch aarch64 --gem5-build-type debug
|
||||
./run --arch aarch64 --debug-vm --gem5 --gem5-build-type debug
|
||||
....
|
||||
|
||||
We generate a separate build folder with `--gem5-build-id` just to prevent the `opt` build from getting overwritten, so we can keep both around at the same time.
|
||||
The build outputs are automatically stored in a different directory from other build types such as `.opt` build, which prevents `.debug` files from overwriting `.opt` ones.
|
||||
|
||||
The price to pay however is high: a Linux kernel boot was about 14 times slower than opt at 71e927e63bda6507d5a528f22c78d65099bdf36f between the commands:
|
||||
The price to pay for debuggability is high however: a Linux kernel boot was about 14 times slower than opt at 71e927e63bda6507d5a528f22c78d65099bdf36f between the commands:
|
||||
|
||||
....
|
||||
./run --arch aarch64 --eval 'm5 exit' --gem5 --linux-build-id v4.16
|
||||
./run --arch aarch64 --eval 'm5 exit' --gem5 --linux-build-id v4.16 --gem5-build-id debug --gem5-build-type debug
|
||||
./run --arch aarch64 --eval 'm5 exit' --gem5 --linux-build-id v4.16 --gem5-build-type debug
|
||||
....
|
||||
|
||||
so you will likely only use this when it is unavoidable.
|
||||
|
||||
@@ -499,7 +499,7 @@ def setup(parser):
|
||||
this.qemu_termout_file = os.path.join(this.qemu_run_dir, 'termout.txt')
|
||||
this.qemu_rrfile = os.path.join(this.qemu_run_dir, 'rrfile')
|
||||
this.gem5_out_dir = os.path.join(this.out_dir, 'gem5')
|
||||
this.gem5_build_dir = os.path.join(this.gem5_out_dir, args.gem5_build_id)
|
||||
this.gem5_build_dir = os.path.join(this.gem5_out_dir, args.gem5_build_id, args.gem5_build_type)
|
||||
this.gem5_fake_iso = os.path.join(this.gem5_out_dir, 'fake.iso')
|
||||
this.gem5_m5term = os.path.join(this.gem5_build_dir, 'm5term')
|
||||
this.gem5_build_build_dir = os.path.join(this.gem5_build_dir, 'build')
|
||||
|
||||
Reference in New Issue
Block a user