tracing: More updates for 3.15
Steven Rostedt
maintainercover tracing: More updates for 3.15
Minor changes, but this includes updates from Mathieu Desnoyers for fixing the documentation of the way the current code works in my next repo. He's currently working on other ways to handle the changes, but until that is ready, this will have to do.
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: cb1deb5fc1fded22401c0e9ca6bda056a7f1b553
Jiri Slaby (1)
ftrace: Fix compilation warning about control_ops_free
Mathieu Desnoyers (2)
tracepoints: API doc update to data argument
tracepoints: API doc update to tracepoint_probe_register() return value
Sasha Levin (1)
ftrace: Constify ftrace_text_reserved
----
include/linux/ftrace.h | 4 ++-- kernel/trace/ftrace.c | 12 ++++++------ kernel/tracepoint.c | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 9 deletions(-)
Steven Rostedt
maintainerPATCH 1/4 ftrace: Fix compilation warning about control_ops_free
From: Jiri Slaby <[email protected]>
With CONFIG_DYNAMIC_FTRACE=n, I see a warning:kernel/trace/ftrace.c:240:13: warning: 'control_ops_free' defined but not used
static void control_ops_free(struct ftrace_ops *ops)
^
Move that function around to an already existing #ifdef CONFIG_DYNAMIC_FTRACE block as the function is used solely from the dynamic function tracing functions.
--- kernel/trace/ftrace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/trace/ftrace.c +5 -5
@@ -237,11 +237,6 @@ static int control_ops_alloc(struct ftrace_ops *ops)return 0 ; } -static void control_ops_free (struct ftrace_ops *ops) -{ -free_percpu (ops->disabled); -} -static void update_global_ops (void ) {ftrace_func_t func = ftrace_global_list_func;
@@ -2100,6 +2095,11 @@ static ftrace_func_t saved_ftrace_func;static int ftrace_start_up;static int global_start_up; +static void control_ops_free (struct ftrace_ops *ops) +{ +free_percpu (ops->disabled); +} +static void ftrace_startup_enable (int command) {if (saved_ftrace_func != ftrace_trace_function) {
Signature · 1 line
1.8.5.3
Steven Rostedt
maintainerPATCH 2/4 tracepoints: API doc update to data argument
In reply to Steven RostedtFrom: Mathieu Desnoyers <[email protected]>
Describe the @data argument (probe private data).
--- kernel/tracepoint.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/tracepoint.c +4 -0
@@ -376,6 +376,7 @@ tracepoint_add_probe(const char *name, void *probe, void *data)* tracepoint_probe_register - Connect a probe to a tracepoint * @name: tracepoint name * @probe: probe handler +* @data: probe private data * * Returns 0 if ok, error value on error. * The probe address must at least be aligned on the architecture pointer size.
@@ -424,6 +425,7 @@ tracepoint_remove_probe(const char *name, void *probe, void *data)* tracepoint_probe_unregister - Disconnect a probe from a tracepoint * @name: tracepoint name * @probe: probe function pointer +* @data: probe private data * * We do not need to call a synchronize_sched to make sure the probes have * finished running before doing a module unload, because the module unload
@@ -464,6 +466,7 @@ static void tracepoint_add_old_probes(void *old)* tracepoint_probe_register_noupdate - register a probe but not connect * @name: tracepoint name * @probe: probe handler +* @data: probe private data * * caller must call tracepoint_probe_update_all() */
@@ -488,6 +491,7 @@ EXPORT_SYMBOL_GPL(tracepoint_probe_register_noupdate);* tracepoint_probe_unregister_noupdate - remove a probe but not disconnect * @name: tracepoint name * @probe: probe function pointer +* @data: probe private data * * caller must call tracepoint_probe_update_all() */
Signature · 1 line
1.8.5.3
Steven Rostedt
maintainerPATCH 3/4 tracepoints: API doc update to tracepoint_probe_register() return value
In reply to Steven RostedtFrom: Mathieu Desnoyers <[email protected]>
Describe the return values of tracepoint_probe_register(), including -ENODEV added by commit:
Author: Steven Rostedt <[email protected]>
tracing: Warn if a tracepoint is not set via debugfs
--- kernel/tracepoint.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
kernel/tracepoint.c +11 -1
@@ -378,7 +378,17 @@ tracepoint_add_probe(const char *name, void *probe, void *data)* @probe: probe handler * @data: probe private data * -* Returns 0 if ok, error value on error. +* Returns: +* - 0 if the probe was successfully registered, and tracepoint +* callsites are currently loaded for that probe, +* - -ENODEV if the probe was successfully registered, but no tracepoint +* callsite is currently loaded for that probe, +* - other negative error value on error. +* +* When tracepoint_probe_register() returns either 0 or -ENODEV, +* parameters @name, @probe, and @data may be used by the tracepoint +* infrastructure until the probe is unregistered. +* * The probe address must at least be aligned on the architecture pointer size. */ int tracepoint_probe_register (const char *name,void *probe,void *data)
Signature · 1 line
1.8.5.3
Steven Rostedt
maintainerPATCH 4/4 ftrace: Constify ftrace_text_reserved
In reply to Steven RostedtFrom: Sasha Levin <[email protected]>
--- include/linux/ftrace.h | 4 ++-- kernel/trace/ftrace.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
include/linux/ftrace.h +2 -2
@@ -299,7 +299,7 @@ extern void unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops);extern void unregister_ftrace_function_probe_all (char *glob); -extern int ftrace_text_reserved (void *start,void *end); +extern int ftrace_text_reserved (const void *start,const void *end);extern int ftrace_nr_registered_ops (void );
@@ -552,7 +552,7 @@ static inline __init int unregister_ftrace_command(char *cmd_name) {return -EINVAL ; } -static inline int ftrace_text_reserved (void *start,void *end) +static inline int ftrace_text_reserved (const void *start,const void *end) {return 0 ; }
kernel/trace/ftrace.c +1 -1
@@ -1555,7 +1555,7 @@ unsigned long ftrace_location(unsigned long ip)* the function tracer. It checks the ftrace internal tables to * determine if the address belongs or not. */ -int ftrace_text_reserved (void *start,void *end) +int ftrace_text_reserved (const void *start,const void *end) {unsigned long ret;
Signature · 1 line
1.8.5.3