Skip to content

Commit

Permalink
function-graph: Allow writing the same val to set_graph_function
Browse files Browse the repository at this point in the history
# 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: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
LKML-reference: <4B1DC4E1.1060303@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Li Zefan authored and Frederic Weisbecker committed Dec 13, 2009
1 parent 313254a commit 91baf62
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2552,10 +2552,9 @@ ftrace_set_func(unsigned long *array, int *idx, char *buffer)
exists = true;
break;
}
if (!exists) {
if (!exists)
array[(*idx)++] = rec->ip;
found = 1;
}
found = 1;
}
} while_for_each_ftrace_rec();

Expand Down

0 comments on commit 91baf62

Please sign in to comment.