提交 91baf628 编写于 作者: L Li Zefan 提交者: Frederic Weisbecker

function-graph: Allow writing the same val to set_graph_function

# echo 'do_open' > set_graph_function
 # echo 'do_open' >> set_graph_function
 bash: echo: write error: Invalid argument

Make it valid to write the same value to set_graph_function,
which is consistent with set_ftrace_filter interface.
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
Acked-by: NSteven Rostedt <rostedt@goodmis.org>
LKML-reference: <4B1DC4E1.1060303@cn.fujitsu.com>
Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
上级 313254a9
...@@ -2552,10 +2552,9 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer) ...@@ -2552,10 +2552,9 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer)
exists = true; exists = true;
break; break;
} }
if (!exists) { if (!exists)
array[(*idx)++] = rec->ip; array[(*idx)++] = rec->ip;
found = 1; found = 1;
}
} }
} while_for_each_ftrace_rec(); } while_for_each_ftrace_rec();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册