mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
23 lines
610 B
Bash
Executable File
23 lines
610 B
Bash
Executable File
#!/usr/bin/env bash
|
|
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
|
|
while getopts "${common_getopts_flags}" OPT; do
|
|
case "$OPT" in
|
|
?)
|
|
common_getopts_case "$OPT"
|
|
;;
|
|
esac
|
|
done
|
|
common_setup
|
|
kernel_dir="${common_build_dir}/linux-custom"
|
|
(
|
|
if "$common_gem5"; then
|
|
sed -r 's/^.* (0x[^. ]*)[. ].*/\1/' "$common_trace_txt_file"
|
|
else
|
|
sed -r 's/.*pc=//' "$common_trace_txt_file"
|
|
fi
|
|
) | \
|
|
xargs "${common_host_dir}/bin/${common_arch}-linux-addr2line" -e "${common_vmlinux}" -fp | \
|
|
sed -E "s|at ${kernel_dir}/(\./\|)||" | \
|
|
uniq -c \
|
|
> "${common_run_dir}/trace-lines.txt"
|