mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
time all builds and run
This commit is contained in:
15
README.adoc
15
README.adoc
@@ -353,13 +353,24 @@ To get a terminal, either open a new shell and run:
|
||||
./gem5-shell
|
||||
....
|
||||
|
||||
or if you are inside tmux, which I highly recommend, just run gem5 with:
|
||||
The only way to exit the shell is to kill the gem5 on the previous shell
|
||||
|
||||
If you are inside tmux, which I highly recommend, just run gem5 with:
|
||||
|
||||
....
|
||||
./run --gem5 --tmux
|
||||
....
|
||||
|
||||
This will open up a split terminal by default so that you can see both the gem5 stdout and the terminal. See also: <<tmux-gem5>>
|
||||
This will open up a split terminal by default so that you can see both the gem5 stdout and the terminal. See also: <<tmux-gem5>>.
|
||||
|
||||
At the end of boot, it might not be very clear that you have the shell since some <<printk>> messages may appear in front of the prompt like this:
|
||||
|
||||
....
|
||||
# <6>[ 1.215329] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1cd486fa865, max_idle_ns: 440795259574 ns
|
||||
<6>[ 1.215351] clocksource: Switched to clocksource tsc
|
||||
....
|
||||
|
||||
but if you look closely, the `PS1` prompt marker `#` is there already, just hit enter and a clear prompt line will appear.
|
||||
|
||||
If you forgot to open the shell and gem5 exit, you can inspect the terminal output post-mortem at:
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
import common
|
||||
|
||||
@@ -23,6 +24,7 @@ disks_dir = os.path.join(common.gem5_system_dir, 'disks')
|
||||
if args.clean:
|
||||
common.rmrf(common.gem5_build_dir)
|
||||
else:
|
||||
start_time = time.time()
|
||||
os.makedirs(binaries_dir, exist_ok=True)
|
||||
os.makedirs(disks_dir, exist_ok=True)
|
||||
if not os.path.exists(os.path.join(common.gem5_src_dir, '.git')):
|
||||
@@ -81,3 +83,5 @@ else:
|
||||
term_src_dir = os.path.join(common.gem5_src_dir, 'util/term')
|
||||
subprocess.check_call(['make', '-C', term_src_dir])
|
||||
shutil.copy2(os.path.join(term_src_dir, 'm5term'), common.gem5_m5term)
|
||||
end_time = time.time()
|
||||
common.print_time(end_time - start_time)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import multiprocessing
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
import common
|
||||
|
||||
@@ -18,6 +19,7 @@ args = common.setup(parser)
|
||||
if args.clean:
|
||||
common.rmrf(common.qemu_build_dir)
|
||||
else:
|
||||
start_time = time.time()
|
||||
os.makedirs(common.qemu_build_dir, exist_ok=True)
|
||||
subprocess.check_call(
|
||||
[
|
||||
@@ -37,5 +39,8 @@ else:
|
||||
# TODO factor with build.
|
||||
'-j', str(multiprocessing.cpu_count()),
|
||||
],
|
||||
cwd=common.qemu_build_dir
|
||||
cwd=common.qemu_build_dir,
|
||||
extra_env={'PATH': '/usr/lib/ccache:' + os.environ['PATH']},
|
||||
)
|
||||
end_time = time.time()
|
||||
common.print_time(end_time - start_time)
|
||||
|
||||
9
run
9
run
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import re
|
||||
import time
|
||||
|
||||
import common
|
||||
|
||||
@@ -463,4 +464,8 @@ Run QEMU with VNC instead of the default SDL. Connect to it with:
|
||||
if __name__ == '__main__':
|
||||
parser = get_argparse()
|
||||
args = common.setup(parser)
|
||||
sys.exit(main(args))
|
||||
start_time = time.time()
|
||||
exit_status = main(args)
|
||||
end_time = time.time()
|
||||
common.print_time(end_time - start_time)
|
||||
sys.exit(exit_status)
|
||||
|
||||
Reference in New Issue
Block a user