tracing: doc: cleanup typo and unused code
Subsystems (3)
Masami Hiramatsu
maintainercover tracing: doc: cleanup typo and unused code
Hi,
Here are tracing related patches to fix a typo in document and remove unused functions which I found when improving ftracetest.
Note that those are not bug, just cleanup the source code, so I don't forward it to stable-ML.
Thank you,
---
Masami Hiramatsu (3):
doc: tracing: Fix a typo of trace_stat
tracing: Remove orphaned function using_ftrace_ops_list_func().
tracing: Remove orphaned function ftrace_nr_registered_ops()
0 files changed
--
Masami Hiramatsu (Linaro) <[email protected]>
Masami Hiramatsu
maintainerPATCH 1/3 doc: tracing: Fix a typo of trace_stat
The name of the directory for per-cpu function statistics is trace_stat, not trace_stats.
---
0 files changed
Documentation/trace/ftrace.rst +2 -2
@@ -329,9 +329,9 @@ of ftrace. Here is a list of some of the key files: track of the time spent in those functions. The histogram content can be displayed in the files: - trace_stats/function<cpu> ( function0, function1, etc). + trace_stat/function<cpu> ( function0, function1, etc). - trace_stats: + trace_stat: A directory that holds different tracing stats.
kernel/trace/Kconfig +1 -1
@@ -521,7 +521,7 @@ config FUNCTION_PROFILER in debugfs called function_profile_enabled which defaults to zero. When a 1 is echoed into this file profiling begins, and when a zero is entered, profiling stops. A "functions" file is created in - the trace_stats directory; this file shows the list of functions that + the trace_stat directory; this file shows the list of functions that have been hit and their counters. If in doubt, say N.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] doc: tracing: Fix a typo of trace_stat
Jon,
Can you take this patch?
I'll take the other two.
Thanks!
-- Steve
Quoted 30 lines · On Thu, 26 Jul 2018 21:43:36 +0900 Masami Hiramatsu <[email protected]> wrote:
The name of the directory for per-cpu function statistics is
trace_stat, nottrace_stats.Signed-off-by Masami Hiramatsu <[email protected]>Cc Jonathan Corbet <[email protected]>---
0 files changedDocumentation/trace/ftrace.rst +2
-2@@ -329,9 +329,9 @@ of ftrace. Here is a list of some of the key files: track of the time spent in those functions. The histogram content can be displayed in the files: - trace_stats/function<cpu> ( function0, function1, etc). + trace_stat/function<cpu> ( function0, function1, etc). - trace_stats: + trace_stat: A directory that holds different tracing stats.kernel/trace/Kconfig +0
-0
kernel/trace/Kconfig config FUNCTION_PROFILER · line 527
Quoted 8 lines
kernel/trace/Kconfig +1
-1@@ -521,7 +521,7 @@ config FUNCTION_PROFILER in debugfs called function_profile_enabled which defaults to zero. When a 1 is echoed into this file profiling begins, and when a zero is entered, profiling stops. A "functions" file is created in - the trace_stats directory; this file shows the list of functions that + the trace_stat directory; this file shows the list of functions that have been hit and their counters. If in doubt, say N.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Corbet
maintainerRe: [PATCH 1/3] doc: tracing: Fix a typo of trace_stat
Quoted 3 lines · On Thu, 26 Jul 2018 10:51:52 -0400 Steven Rostedt <[email protected]> wrote:
Can you take this patch?
Done, thanks.
jon
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Masami Hiramatsu
maintainerPATCH 2/3 tracing: Remove orphaned function using_ftrace_ops_list_func().
In reply to Masami HiramatsuRemove using_ftrace_ops_list_func() since it is no more used.
using_ftrace_ops_list_func() has been introduced by commit 7eea4fce0246 ("tracing/stack_trace: Skip 4 instead of 3 when using ftrace_ops_list_func") as a helper function, but its caller has been removed by commit 72ac426a5bb0 ("tracing: Clean up stack tracing and fix fentry updates"). So it is not called anymore.
---
0 files changed
kernel/trace/ftrace.c +0 -5
@@ -313,11 +313,6 @@ static void update_ftrace_function(void) ftrace_trace_function = func; } -int using_ftrace_ops_list_func (void ) -{ -return ftrace_trace_function == ftrace_ops_list_func; -} -static void add_ftrace_ops (struct ftrace_ops __rcu **list,struct ftrace_ops *ops) {
kernel/trace/trace.h +0 -1
@@ -937,7 +937,6 @@ void ftrace_destroy_function_files(struct trace_array *tr);void ftrace_init_global_array_ops (struct trace_array *tr);void ftrace_init_array_ops (struct trace_array *tr,ftrace_func_t func);void ftrace_reset_array_ops (struct trace_array *tr); -int using_ftrace_ops_list_func (void );void ftrace_init_tracefs (struct trace_array *tr,struct dentry *d_tracer);void ftrace_init_tracefs_toplevel (struct trace_array *tr,struct dentry *d_tracer);
Masami Hiramatsu
maintainerPATCH 3/3 tracing: Remove orphaned function ftrace_nr_registered_ops()
In reply to Masami HiramatsuRemove ftrace_nr_registered_ops() because it is no more used.
ftrace_nr_registered_ops() has been introduced by commit ea701f11da44 ("ftrace: Add selftest to test function trace recursion protection"), but its caller has been removed by commit 05cbbf643b8e ("tracing: Fix selftest function recursion accounting"). So it is not called anymore.
---
0 files changed
include/linux/ftrace.h +0 -6
@@ -234,10 +234,6 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1,*/ #define register_ftrace_function (ops) ({ 0; })#define unregister_ftrace_function (ops) ({ 0; }) -static inline int ftrace_nr_registered_ops (void ) -{ -return 0 ; -}static inline void ftrace_kill (void ) { }static inline void ftrace_free_init_mem (void ) { }static inline void ftrace_free_mem (struct module *mod,void *start,void *end) { }
@@ -328,8 +324,6 @@ struct seq_file;extern int ftrace_text_reserved (const void *start,const void *end); -extern int ftrace_nr_registered_ops (void ); -struct ftrace_ops *ftrace_ops_trampoline (unsigned long addr);bool is_ftrace_trampoline (unsigned long addr);
kernel/trace/ftrace.c +0 -24
@@ -157,30 +157,6 @@ static inline void ftrace_ops_init(struct ftrace_ops *ops)#endif } -/** -* ftrace_nr_registered_ops - return number of ops registered -* -* Returns the number of ftrace_ops registered and tracing functions -*/ -int ftrace_nr_registered_ops (void ) -{ -struct ftrace_ops *ops; -int cnt =0 ; - -mutex_lock (&ftrace_lock); - -for (ops =rcu_dereference_protected (ftrace_ops_list, -lockdep_is_held (&ftrace_lock)); - ops != &ftrace_list_end; - ops =rcu_dereference_protected (ops->next, -lockdep_is_held (&ftrace_lock))) - cnt++; - -mutex_unlock (&ftrace_lock); - -return cnt; -} -static void ftrace_pid_func (unsigned long ip,unsigned long parent_ip,struct ftrace_ops *op,struct pt_regs *regs) {