diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-10-14 04:24:23 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-10-18 22:15:25 -0400 |
commit | 9aa72b4bf823b7b439fbba95fa84abee3b9d6d79 (patch) | |
tree | 848399ae19cbfe4927fd60179c3c2f8f2d02e73a /kernel | |
parent | 057db8488b53d5e4faa0cedb2f39d4ae75dfbdbb (diff) |
ftrace: Get rid of ftrace_graph_filter_enabled
The ftrace_graph_filter_enabled means that user sets function filter
and it always has same meaning of ftrace_graph_count > 0.
Link: http://lkml.kernel.org/r/1381739066-7531-2-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ftrace.c | 6 | ||||
-rw-r--r-- | kernel/trace/trace.h | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 03cf44ac54d3..a77e4a0142ee 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -3776,7 +3776,6 @@ static const struct file_operations ftrace_notrace_fops = { | |||
3776 | static DEFINE_MUTEX(graph_lock); | 3776 | static DEFINE_MUTEX(graph_lock); |
3777 | 3777 | ||
3778 | int ftrace_graph_count; | 3778 | int ftrace_graph_count; |
3779 | int ftrace_graph_filter_enabled; | ||
3780 | unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS] __read_mostly; | 3779 | unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS] __read_mostly; |
3781 | 3780 | ||
3782 | static void * | 3781 | static void * |
@@ -3799,7 +3798,7 @@ static void *g_start(struct seq_file *m, loff_t *pos) | |||
3799 | mutex_lock(&graph_lock); | 3798 | mutex_lock(&graph_lock); |
3800 | 3799 | ||
3801 | /* Nothing, tell g_show to print all functions are enabled */ | 3800 | /* Nothing, tell g_show to print all functions are enabled */ |
3802 | if (!ftrace_graph_filter_enabled && !*pos) | 3801 | if (!ftrace_graph_count && !*pos) |
3803 | return (void *)1; | 3802 | return (void *)1; |
3804 | 3803 | ||
3805 | return __g_next(m, pos); | 3804 | return __g_next(m, pos); |
@@ -3845,7 +3844,6 @@ ftrace_graph_open(struct inode *inode, struct file *file) | |||
3845 | mutex_lock(&graph_lock); | 3844 | mutex_lock(&graph_lock); |
3846 | if ((file->f_mode & FMODE_WRITE) && | 3845 | if ((file->f_mode & FMODE_WRITE) && |
3847 | (file->f_flags & O_TRUNC)) { | 3846 | (file->f_flags & O_TRUNC)) { |
3848 | ftrace_graph_filter_enabled = 0; | ||
3849 | ftrace_graph_count = 0; | 3847 | ftrace_graph_count = 0; |
3850 | memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs)); | 3848 | memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs)); |
3851 | } | 3849 | } |
@@ -3925,8 +3923,6 @@ out: | |||
3925 | if (fail) | 3923 | if (fail) |
3926 | return -EINVAL; | 3924 | return -EINVAL; |
3927 | 3925 | ||
3928 | ftrace_graph_filter_enabled = !!(*idx); | ||
3929 | |||
3930 | return 0; | 3926 | return 0; |
3931 | } | 3927 | } |
3932 | 3928 | ||
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 10c86fb7a2b4..40211cef2796 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -730,7 +730,6 @@ extern void __trace_graph_return(struct trace_array *tr, | |||
730 | #ifdef CONFIG_DYNAMIC_FTRACE | 730 | #ifdef CONFIG_DYNAMIC_FTRACE |
731 | /* TODO: make this variable */ | 731 | /* TODO: make this variable */ |
732 | #define FTRACE_GRAPH_MAX_FUNCS 32 | 732 | #define FTRACE_GRAPH_MAX_FUNCS 32 |
733 | extern int ftrace_graph_filter_enabled; | ||
734 | extern int ftrace_graph_count; | 733 | extern int ftrace_graph_count; |
735 | extern unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS]; | 734 | extern unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS]; |
736 | 735 | ||
@@ -738,7 +737,7 @@ static inline int ftrace_graph_addr(unsigned long addr) | |||
738 | { | 737 | { |
739 | int i; | 738 | int i; |
740 | 739 | ||
741 | if (!ftrace_graph_filter_enabled) | 740 | if (!ftrace_graph_count) |
742 | return 1; | 741 | return 1; |
743 | 742 | ||
744 | for (i = 0; i < ftrace_graph_count; i++) { | 743 | for (i = 0; i < ftrace_graph_count; i++) { |