mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
build-linux and build-gem5 seem to work
This commit is contained in:
20
trace2line
20
trace2line
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user