All of lore.kernel.org
 help / color / mirror / Atom feed
* [for-next][PATCH 0/4] tracing: More updates for 3.15
@ 2014-03-20  2:58 Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 1/4] ftrace: Fix compilation warning about control_ops_free Steven Rostedt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Steven Rostedt @ 2014-03-20  2:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Mathieu Desnoyers

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(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [for-next][PATCH 1/4] ftrace: Fix compilation warning about control_ops_free
  2014-03-20  2:58 [for-next][PATCH 0/4] tracing: More updates for 3.15 Steven Rostedt
@ 2014-03-20  2:58 ` Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 2/4] tracepoints: API doc update to data argument Steven Rostedt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2014-03-20  2:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton,
	Mathieu Desnoyers, Jiri Slaby, Ingo Molnar

[-- Attachment #1: 0000-ftrace-Fix-compilation-warning-about-control_ops_fre.patch --]
[-- Type: text/plain, Size: 1487 bytes --]

From: Jiri Slaby <jslaby@suse.cz>

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.

Link: http://lkml.kernel.org/r/1394484131-5107-1-git-send-email-jslaby@suse.cz

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 0e48ff4..b4531b2 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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) {
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 2/4] tracepoints: API doc update to data argument
  2014-03-20  2:58 [for-next][PATCH 0/4] tracing: More updates for 3.15 Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 1/4] ftrace: Fix compilation warning about control_ops_free Steven Rostedt
@ 2014-03-20  2:58 ` Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 3/4] tracepoints: API doc update to tracepoint_probe_register() return value Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 4/4] ftrace: Constify ftrace_text_reserved Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2014-03-20  2:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Mathieu Desnoyers

[-- Attachment #1: 0001-tracepoints-API-doc-update-to-data-argument.patch --]
[-- Type: text/plain, Size: 2117 bytes --]

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Describe the @data argument (probe private data).

Link: http://lkml.kernel.org/r/1394587948-27878-1-git-send-email-mathieu.desnoyers@efficios.com

Fixes: 38516ab59fbc "tracing: Let tracepoints have data passed to tracepoint callbacks"
CC: Ingo Molnar <mingo@kernel.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/tracepoint.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 0058f33..a4f629d 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -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()
  */
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 3/4] tracepoints: API doc update to tracepoint_probe_register() return value
  2014-03-20  2:58 [for-next][PATCH 0/4] tracing: More updates for 3.15 Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 1/4] ftrace: Fix compilation warning about control_ops_free Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 2/4] tracepoints: API doc update to data argument Steven Rostedt
@ 2014-03-20  2:58 ` Steven Rostedt
  2014-03-20  2:58 ` [for-next][PATCH 4/4] ftrace: Constify ftrace_text_reserved Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2014-03-20  2:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Mathieu Desnoyers

[-- Attachment #1: 0002-tracepoints-API-doc-update-to-tracepoint_probe_regis.patch --]
[-- Type: text/plain, Size: 1684 bytes --]

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Describe the return values of tracepoint_probe_register(), including
-ENODEV added by commit:

Author: Steven Rostedt <rostedt@goodmis.org>

    tracing: Warn if a tracepoint is not set via debugfs

Link: http://lkml.kernel.org/r/1394499898-1537-2-git-send-email-mathieu.desnoyers@efficios.com

CC: Ingo Molnar <mingo@kernel.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/tracepoint.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index a4f629d..e2a58a2 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -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)
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 4/4] ftrace: Constify ftrace_text_reserved
  2014-03-20  2:58 [for-next][PATCH 0/4] tracing: More updates for 3.15 Steven Rostedt
                   ` (2 preceding siblings ...)
  2014-03-20  2:58 ` [for-next][PATCH 3/4] tracepoints: API doc update to tracepoint_probe_register() return value Steven Rostedt
@ 2014-03-20  2:58 ` Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2014-03-20  2:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton,
	Mathieu Desnoyers, Sasha Levin

[-- Attachment #1: 0003-ftrace-Constify-ftrace_text_reserved.patch --]
[-- Type: text/plain, Size: 1611 bytes --]

From: Sasha Levin <sasha.levin@oracle.com>

Link: http://lkml.kernel.org/r/1357772960-4436-5-git-send-email-sasha.levin@oracle.com

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/ftrace.h | 4 ++--
 kernel/trace/ftrace.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 20da0561..9212b01 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -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;
 }
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b4531b2..1fd4b94 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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;
 
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-20  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20  2:58 [for-next][PATCH 0/4] tracing: More updates for 3.15 Steven Rostedt
2014-03-20  2:58 ` [for-next][PATCH 1/4] ftrace: Fix compilation warning about control_ops_free Steven Rostedt
2014-03-20  2:58 ` [for-next][PATCH 2/4] tracepoints: API doc update to data argument Steven Rostedt
2014-03-20  2:58 ` [for-next][PATCH 3/4] tracepoints: API doc update to tracepoint_probe_register() return value Steven Rostedt
2014-03-20  2:58 ` [for-next][PATCH 4/4] ftrace: Constify ftrace_text_reserved Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.