12345678910111213141516171819202122232425 |
- #!/usr/bin/env bash
- . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
- parsed=$(getopt -o "${common_getopt_flags}" -l "$common_getopt_flags_long" -- "$@")
- eval set -- "$parsed"
- while true; do
- case "$1" in
- *)
- common_getopt_case "$@"
- ;;
- 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"
|