Skip to content

Commit b848914

Browse files
Steven Rostedtrostedt
authored andcommitted
ftrace: Implement separate user function filtering
ftrace_ops that are registered to trace functions can now be agnostic to each other in respect to what functions they trace. Each ops has their own hash of the functions they want to trace and a hash to what they do not want to trace. A empty hash for the functions they want to trace denotes all functions should be traced that are not in the notrace hash. Cc: Paul E. McKenney <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent 07fd551 commit b848914

File tree

6 files changed

+166
-39
lines changed

6 files changed

+166
-39
lines changed

include/linux/ftrace.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,18 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
3131

3232
struct ftrace_hash;
3333

34+
enum {
35+
FTRACE_OPS_FL_ENABLED = 1 << 0,
36+
FTRACE_OPS_FL_GLOBAL = 1 << 1,
37+
};
38+
3439
struct ftrace_ops {
3540
ftrace_func_t func;
3641
struct ftrace_ops *next;
42+
unsigned long flags;
3743
#ifdef CONFIG_DYNAMIC_FTRACE
3844
struct ftrace_hash *notrace_hash;
3945
struct ftrace_hash *filter_hash;
40-
unsigned long flags;
4146
#endif
4247
};
4348

0 commit comments

Comments
 (0)