tracing: Have trace_buffer_unlock_commit() call the _regs version with NULL
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 29 Apr 2016 21:44:01 +0000 (17:44 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 29 Apr 2016 21:44:01 +0000 (17:44 -0400)
There's no real difference between trace_buffer_unlock_commit() and
trace_buffer_unlock_commit_regs() except that the former passes NULL to
ftrace_stack_trace() instead of regs. Have the former be a static inline of
the latter which passes NULL for regs.

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

index e5bdb9accf52c667046d48ae3e9b8f7ee4c12933..41bf14412666050b1a77efa449747afdb7d66945 100644 (file)
@@ -1686,17 +1686,6 @@ __buffer_unlock_commit(struct ring_buffer *buffer, struct ring_buffer_event *eve
        ring_buffer_unlock_commit(buffer, event);
 }
 
-void trace_buffer_unlock_commit(struct trace_array *tr,
-                               struct ring_buffer *buffer,
-                               struct ring_buffer_event *event,
-                               unsigned long flags, int pc)
-{
-       __buffer_unlock_commit(buffer, event);
-
-       ftrace_trace_stack(tr, buffer, flags, 6, pc, NULL);
-       ftrace_trace_userstack(buffer, flags, pc);
-}
-
 static struct ring_buffer *temp_buffer;
 
 struct ring_buffer_event *
index bd5ae56dec7a0c48a119414450c596877fd3047e..10156a09103f2b5c254b185ad12c02e304a0021e 100644 (file)
@@ -1069,15 +1069,20 @@ extern int call_filter_check_discard(struct trace_event_call *call, void *rec,
                                     struct ring_buffer *buffer,
                                     struct ring_buffer_event *event);
 
-void trace_buffer_unlock_commit(struct trace_array *tr,
-                               struct ring_buffer *buffer,
-                               struct ring_buffer_event *event,
-                               unsigned long flags, int pc);
 void trace_buffer_unlock_commit_regs(struct trace_array *tr,
                                     struct ring_buffer *buffer,
                                     struct ring_buffer_event *event,
                                     unsigned long flags, int pc,
                                     struct pt_regs *regs);
+
+static inline void trace_buffer_unlock_commit(struct trace_array *tr,
+                                             struct ring_buffer *buffer,
+                                             struct ring_buffer_event *event,
+                                             unsigned long flags, int pc)
+{
+       trace_buffer_unlock_commit_regs(tr, buffer, event, flags, pc, NULL);
+}
+
 /*
  * Helper function for event_trigger_unlock_commit{_regs}().
  * If there are event triggers attached to this event that requires