]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tracing: Pass trace_array to flag_changed callback
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 10 Jan 2014 22:51:01 +0000 (17:51 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 20 Feb 2014 17:13:08 +0000 (12:13 -0500)
As options (flags) may affect instances instead of being global
the flag_changed() callbacks need to receive the trace_array descriptor
of the instance they will be modifying.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c

index d7dfc7efc4bf5b1e70b6bf59976d56de68cc8831..ee8da93e91e0b7cd2a333fd8c2c645403e8d9afc 100644 (file)
@@ -3393,7 +3393,7 @@ int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled)
 
        /* Give the tracer a chance to approve the change */
        if (tr->current_trace->flag_changed)
-               if (tr->current_trace->flag_changed(tr->current_trace, mask, !!enabled))
+               if (tr->current_trace->flag_changed(tr, mask, !!enabled))
                        return -EINVAL;
 
        if (enabled)
index 649a23d421c1ee6963e48304368988acf7c47601..36e44732c6508e991137875445911571019675ef 100644 (file)
@@ -358,7 +358,7 @@ struct tracer {
        int                     (*set_flag)(struct trace_array *tr,
                                            u32 old_flags, u32 bit, int set);
        /* Return 0 if OK with change, else return non-zero */
-       int                     (*flag_changed)(struct tracer *tracer,
+       int                     (*flag_changed)(struct trace_array *tr,
                                                u32 mask, int set);
        struct tracer           *next;
        struct tracer_flags     *flags;
index fd99b0c183acf084a1172fc0932e9073f6451c61..4bf812f454e686a29041ef860f51a6a2beee675b 100644 (file)
@@ -572,8 +572,10 @@ static void irqsoff_function_set(int set)
                unregister_irqsoff_function(is_graph());
 }
 
-static int irqsoff_flag_changed(struct tracer *tracer, u32 mask, int set)
+static int irqsoff_flag_changed(struct trace_array *tr, u32 mask, int set)
 {
+       struct tracer *tracer = tr->current_trace;
+
        if (mask & TRACE_ITER_FUNCTION)
                irqsoff_function_set(set);
 
index f0bbdc2610287da0323b0da427b69b5a21288259..e14da5e97a69d86611d236488ce5669a28c64be5 100644 (file)
@@ -179,8 +179,10 @@ static void wakeup_function_set(int set)
                unregister_wakeup_function(is_graph());
 }
 
-static int wakeup_flag_changed(struct tracer *tracer, u32 mask, int set)
+static int wakeup_flag_changed(struct trace_array *tr, u32 mask, int set)
 {
+       struct tracer *tracer = tr->current_trace;
+
        if (mask & TRACE_ITER_FUNCTION)
                wakeup_function_set(set);