File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tools/testing/selftests/bpf Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1919#include <gelf.h>
2020#include "bpf/hashmap.h"
2121#include "bpf/libbpf_internal.h"
22+ #include "bpf_util.h"
2223
2324#define TRACEFS_PIPE "/sys/kernel/tracing/trace_pipe"
2425#define DEBUGFS_PIPE "/sys/kernel/debug/tracing/trace_pipe"
@@ -540,8 +541,20 @@ static bool is_invalid_entry(char *buf, bool kernel)
540541 return false;
541542}
542543
544+ static const char * const trace_blacklist [] = {
545+ "migrate_disable" ,
546+ "migrate_enable" ,
547+ "rcu_read_unlock_strict" ,
548+ "preempt_count_add" ,
549+ "preempt_count_sub" ,
550+ "__rcu_read_lock" ,
551+ "__rcu_read_unlock" ,
552+ };
553+
543554static bool skip_entry (char * name )
544555{
556+ int i ;
557+
545558 /*
546559 * We attach to almost all kernel functions and some of them
547560 * will cause 'suspicious RCU usage' when fprobe is attached
@@ -559,6 +572,12 @@ static bool skip_entry(char *name)
559572 if (!strncmp (name , "__ftrace_invalid_address__" ,
560573 sizeof ("__ftrace_invalid_address__" ) - 1 ))
561574 return true;
575+
576+ for (i = 0 ; i < ARRAY_SIZE (trace_blacklist ); i ++ ) {
577+ if (!strcmp (name , trace_blacklist [i ]))
578+ return true;
579+ }
580+
562581 return false;
563582}
564583
You can’t perform that action at this time.
0 commit comments