diff options
author | Alexander Z Lam <azl@google.com> | 2013-07-01 18:31:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 17:07:43 -0400 |
commit | b7f15519edb2e3c3d7d07d6a0780a4386ef23085 (patch) | |
tree | 790ba38cd573d2aaa17936e44bc0f3a243c89f27 /kernel | |
parent | 86515381237a7f3c88a4a36e3e4d32d58635b972 (diff) |
tracing: Make trace_marker use the correct per-instance buffer
commit 2d71619c59fac95a5415a326162fa046161b938c upstream.
The trace_marker file was present for each new instance created, but it
added the trace mark to the global trace buffer instead of to
the instance's buffer.
Link: http://lkml.kernel.org/r/1372717885-4543-2-git-send-email-azl@google.com
Signed-off-by: Alexander Z Lam <azl@google.com>
Cc: David Sharp <dhsharp@google.com>
Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: Alexander Z Lam <lambchop468@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e71a8be4a6ee..b90c993462be 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -4328,6 +4328,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, | |||
4328 | size_t cnt, loff_t *fpos) | 4328 | size_t cnt, loff_t *fpos) |
4329 | { | 4329 | { |
4330 | unsigned long addr = (unsigned long)ubuf; | 4330 | unsigned long addr = (unsigned long)ubuf; |
4331 | struct trace_array *tr = filp->private_data; | ||
4331 | struct ring_buffer_event *event; | 4332 | struct ring_buffer_event *event; |
4332 | struct ring_buffer *buffer; | 4333 | struct ring_buffer *buffer; |
4333 | struct print_entry *entry; | 4334 | struct print_entry *entry; |
@@ -4387,7 +4388,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, | |||
4387 | 4388 | ||
4388 | local_save_flags(irq_flags); | 4389 | local_save_flags(irq_flags); |
4389 | size = sizeof(*entry) + cnt + 2; /* possible \n added */ | 4390 | size = sizeof(*entry) + cnt + 2; /* possible \n added */ |
4390 | buffer = global_trace.trace_buffer.buffer; | 4391 | buffer = tr->trace_buffer.buffer; |
4391 | event = trace_buffer_lock_reserve(buffer, TRACE_PRINT, size, | 4392 | event = trace_buffer_lock_reserve(buffer, TRACE_PRINT, size, |
4392 | irq_flags, preempt_count()); | 4393 | irq_flags, preempt_count()); |
4393 | if (!event) { | 4394 | if (!event) { |