History

Merge tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftrace fix from Steven Rostedt: "Back in 3.16 the ftrace code was redesigned and cleaned up to remove the double iteration list (one for registered ftrace ops, and one for registered "global" ops), to just use one list. That simplified the code but also broke the function tracing filtering on pid. This updates the code to handle the filtering again with the new logic" * tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix breakage of set_ftrace_pid

Linus Torvalds committed 11 years ago

Commit 763e3262 parents 4520083 e3eea142 files · +37 −18Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/ftrace.h+3−0
@@ -116,6 +116,7 @@ ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops); · 115 unmodified lines
116116 * SAVE_REGS. If another ops with this flag set is already registered
117117 * for any of the functions that this ops will be registered for, then
118118 * this ops will fail to register or set_filter_ip.
119+ * PID - Is affected by set_ftrace_pid (allows filtering on those pids)
119120 */
120121 enum {
121122 FTRACE_OPS_FL_ENABLED = 1 << 0,
@@ -132,6 +133,7 @@ enum { · 10 unmodified lines
132133 FTRACE_OPS_FL_MODIFYING = 1 << 11,
133134 FTRACE_OPS_FL_ALLOC_TRAMP = 1 << 12,
134135 FTRACE_OPS_FL_IPMODIFY = 1 << 13,
136+ FTRACE_OPS_FL_PID = 1 << 14,
135137 };
136138
137139 #ifdef CONFIG_DYNAMIC_FTRACE
@@ -159,6 +161,7 @@ struct ftrace_ops { · 21 unmodified lines
159161 struct ftrace_ops *next;
160162 unsigned long flags;
161163 void *private;
164+ ftrace_func_t saved_func;
162165 int __percpu *disabled;
163166 #ifdef CONFIG_DYNAMIC_FTRACE
164167 int nr_trampolines;