Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391609
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [for-next][PATCH 6/8] tracing: Have trace_buffer_unlock_commit() call the _regs version with NULL |
| Date | 2016-04-30 14:20 +0200 |
| Message-ID | <rtC2n-7C9-29@gated-at.bofh.it> (permalink) |
| References | <rtC2m-7C9-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
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 | 11 -----------
kernel/trace/trace.h | 13 +++++++++----
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e5bdb9accf52..41bf14412666 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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 *
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index bd5ae56dec7a..10156a09103f 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -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
--
2.8.0.rc3
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[for-next][PATCH 0/8] tracing: Various cleanups Steven Rostedt <rostedt@goodmis.org> - 2016-04-30 14:20 +0200 [for-next][PATCH 3/8] tracing: Fold filter_check_discard() into its only user Steven Rostedt <rostedt@goodmis.org> - 2016-04-30 14:20 +0200 [for-next][PATCH 8/8] tracing: Remove unused function trace_current_buffer_lock_reserve() Steven Rostedt <rostedt@goodmis.org> - 2016-04-30 14:20 +0200 [for-next][PATCH 6/8] tracing: Have trace_buffer_unlock_commit() call the _regs version with NULL Steven Rostedt <rostedt@goodmis.org> - 2016-04-30 14:20 +0200
csiph-web