diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-06 17:28:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-06 17:28:12 -0700 |
commit | 592d8362bc2526bbb08cf7d258661691e957b5ea (patch) | |
tree | 9d4742c08163a5bcf17b043b8d602a79916f9cdd /scripts | |
parent | 24cb958695724ffb4488ef4f65892c0767bcd2f2 (diff) | |
parent | 99643bab36b642be10bf09cd3285c37c9e5b597f (diff) |
Merge tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"Misc fixes to kprobes and the faddr2line script, plus a cleanup"
* tag 'perf-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix ';;' typo
scripts/faddr2line: Add CONFIG_DEBUG_INFO check
scripts/faddr2line: Fix vmlinux detection on arm64
x86/kprobes: Update kcb status flag after singlestepping
kprobes: Forbid probing on trampoline and BPF code areas
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/faddr2line | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/faddr2line b/scripts/faddr2line index 94ed98dd899f..5514c23f45c2 100755 --- a/scripts/faddr2line +++ b/scripts/faddr2line @@ -61,6 +61,7 @@ die() { READELF="${CROSS_COMPILE:-}readelf" ADDR2LINE="${CROSS_COMPILE:-}addr2line" AWK="awk" +GREP="grep" command -v ${AWK} >/dev/null 2>&1 || die "${AWK} isn't installed" command -v ${READELF} >/dev/null 2>&1 || die "${READELF} isn't installed" @@ -112,7 +113,9 @@ __faddr2line() { # section offsets. local file_type=$(${READELF} --file-header $objfile | ${AWK} '$1 == "Type:" { print $2; exit }') - [[ $file_type = "EXEC" ]] && is_vmlinux=1 + if [[ $file_type = "EXEC" ]] || [[ $file_type == "DYN" ]]; then + is_vmlinux=1 + fi # Go through each of the object's symbols which match the func name. # In rare cases there might be duplicates, in which case we print all @@ -269,6 +272,8 @@ LIST=0 [[ ! -f $objfile ]] && die "can't find objfile $objfile" shift +${READELF} --section-headers --wide $objfile | ${GREP} -q '\.debug_info' || die "CONFIG_DEBUG_INFO not enabled" + DIR_PREFIX=supercalifragilisticexpialidocious find_dir_prefix $objfile |