build-linux and build-gem5 seem to work

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-12-09 00:00:00 +00:00
parent 1768421dbd
commit 5e20ba833b
33 changed files with 702 additions and 707 deletions

View File

@@ -19,17 +19,17 @@ parser = common.get_argparse(argparse_args={
})
args = common.setup(parser)
sys.exit(subprocess.Popen([
os.path.join(common.root_dir, 'trace2line.sh'),
'true' if common.emulator == 'gem5' else 'false',
common.trace_txt_file,
os.path.join(kwargs['root_dir'], 'trace2line.sh'),
'true' if kwargs['emulator'] == 'gem5' else 'false',
kwargs['trace_txt_file'],
common.get_toolchain_tool('addr2line'),
common.vmlinux,
common.run_dir,
kwargs['vmlinux'],
kwargs['run_dir'],
]).wait())
# This was the full conversion attempt.
# if common.emulator == 'gem5':
# if kwargs['emulator'] == 'gem5':
# def get_pc(line):
# # TODO
# # stdin = sed -r 's/^.* (0x[^. ]*)[. ].*/\1/' "$common_trace_txt_file")
@@ -42,15 +42,15 @@ sys.exit(subprocess.Popen([
# [
# common.get_toolchain_tool('addr2line'),
# '-e',
# common.vmlinux,
# kwargs['vmlinux'],
# '-f',
# '-p',
# ],
# stdout=subprocess.PIPE,
# stdin=subprocess.PIPE,
# ) as proc, \
# open(common.trace_txt_file, 'r') as infile, \
# open(os.path.join(common.run_dir, 'trace-lines.txt'), 'w') as outfile \
# open(kwargs['trace_txt_file'], 'r') as infile, \
# open(os.path.join(kwargs['run_dir'], 'trace-lines.txt'), 'w') as outfile \
# :
# for in_line in infile:
# proc.stdin.write(get_pc(in_line).encode())
@@ -58,5 +58,5 @@ sys.exit(subprocess.Popen([
# stdout = proc.stdout.read()
# outfile.write(stdout.decode())
# # TODO
# # sed -E "s|at ${common.linux_build_dir}/(\./\|)||"
# # sed -E "s|at ${kwargs['linux_build_dir']}/(\./\|)||"
# # uniq -c