Skip to content

Commit

Permalink
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/rostedt/linux-trace into perf/core
  • Loading branch information
Ingo Molnar committed Oct 17, 2011
2 parents c73a3cb + 436fc28 commit 53b0a61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2720,9 +2720,9 @@ static const char readme_msg[] =
"# cat /sys/kernel/debug/tracing/trace_options\n"
"noprint-parent nosym-offset nosym-addr noverbose\n"
"# echo print-parent > /sys/kernel/debug/tracing/trace_options\n"
"# echo 1 > /sys/kernel/debug/tracing/tracing_enabled\n"
"# echo 1 > /sys/kernel/debug/tracing/tracing_on\n"
"# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt\n"
"# echo 0 > /sys/kernel/debug/tracing/tracing_enabled\n"
"# echo 0 > /sys/kernel/debug/tracing/tracing_on\n"
;

static ssize_t
Expand Down Expand Up @@ -3903,8 +3903,6 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
if (info->read < PAGE_SIZE)
goto read;

info->read = 0;

trace_access_lock(info->cpu);
ret = ring_buffer_read_page(info->tr->buffer,
&info->spare,
Expand All @@ -3914,6 +3912,8 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
if (ret < 0)
return 0;

info->read = 0;

read:
size = PAGE_SIZE - info->read;
if (size > count)
Expand Down

0 comments on commit 53b0a61

Please sign in to comment.