diff --git a/README.adoc b/README.adoc index e4ffba6..10fe1c9 100644 --- a/README.adoc +++ b/README.adoc @@ -20574,6 +20574,8 @@ Get results with: tail -n+1 ../linux-kernel-module-cheat-regression/*/gem5-bench-build-*.txt .... +<>, Ubuntu 19.10, LKMC 7c6bb29bc89ec3f1056c0680c3f08bd64018a7bc GCC 9.2.1, gem5 d7d9bc240615625141cd6feddbadd392457e49eb (18-02-2020), `./build --arch aarch64 --gem5-worktree master --no-cache`: 19:33 TODO must investigate why it got so much worse. + ====== Benchmark gem5 single file change rebuild time This is the critical development parameter, and is dominated by the link time of huge binaries. @@ -21155,6 +21157,14 @@ We have https://buildroot.org/downloads/manual/manual.html#ccache[enabled ccache * absolute paths are used and GDB can find source files * but builds are not reused across separated LKMC directories +ccache can be disabled with the `--no-ccache` option as in: + +.... +./build-gem5 --no-ccache +.... + +This can be useful to <>. + === getvar The link:getvar[] helper script can print the values of internal LKMC variables. diff --git a/build-gem5 b/build-gem5 index 88bcfb4..6326fce 100755 --- a/build-gem5 +++ b/build-gem5 @@ -121,6 +121,9 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t gold_linker_cmd = [] else: gold_linker_cmd = ['--gold-linker', LF] + kwargs = {} + if self.env['ccache']: + kwargs['extra_paths'] = [self.env['ccache_dir']] exit_status = self.sh.run_cmd( ( [ @@ -141,9 +144,9 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t self.sh.add_newlines(self.env['extra_scons_args']) ), cwd=self.env['gem5_source_dir'], - extra_paths=[self.env['ccache_dir']], extra_env=extra_env, raise_on_failure = False, + **kwargs ) return exit_status diff --git a/common.py b/common.py index 80eea84..0d2c56a 100644 --- a/common.py +++ b/common.py @@ -221,6 +221,13 @@ CPU architecture to use. If given multiple times, run the action for each arch sequentially in that order. If one of them fails, stop running. Valid archs: {} '''.format(arches_string) + ) + self.add_argument( + '--ccache', + default=True, + help='''\ +Enable or disable ccache: https://cirosantilli.com/linux-kernel-module-cheat#ccache +''' ) self.add_argument( '--dry-run', diff --git a/submodules/gem5 b/submodules/gem5 index fcbea60..4c8efdb 160000 --- a/submodules/gem5 +++ b/submodules/gem5 @@ -1 +1 @@ -Subproject commit fcbea600851fd72c69ecf3fc437628cd67c5123d +Subproject commit 4c8efdbef45d98109769cf675ee3411393e8ed06