From: Achilles <49805408+achilles-git@users.noreply.github.com> Date: Thu, 23 Dec 2021 18:59:59 +0000 (+0530) Subject: exclude static functions with prefix __SCT__ (#3772) X-Git-Tag: v0.24.0~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e8eb8b62f6e92aef332b2eab48305220705dfae;p=platform%2Fupstream%2Fbcc.git exclude static functions with prefix __SCT__ (#3772) The kernel functions with prefix __SCT__ are for static calls. These static call functions are not in /sys/kernel/debug/tracing/available_filter_functions and not in /sys/kernel/debug/kprobes/blacklist either. Let us do filtering in get_kprobe_functions() to filter them out. Co-authored-by: prameet.p --- diff --git a/src/python/bcc/__init__.py b/src/python/bcc/__init__.py index ceb28841..2ff5cf02 100644 --- a/src/python/bcc/__init__.py +++ b/src/python/bcc/__init__.py @@ -737,6 +737,10 @@ class BPF(object): # non-attachable. elif fn.startswith(b'__perf') or fn.startswith(b'perf_'): continue + # Exclude all static functions with prefix __SCT__, they are + # all non-attachable + elif fn.startswith(b'__SCT__'): + continue # Exclude all gcc 8's extra .cold functions elif re.match(b'^.*\.cold(\.\d+)?$', fn): continue