All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
@ 2011-10-17 17:49 Steven Rostedt
  2011-10-17 17:49 ` [PATCH 1/2] ftrace: Fix README to state tracing_on to start/stop tracing Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 17:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]


Ingo,

Please pull the latest tip/perf/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/core

Head SHA1: 436fc280261dcfce5af38f08b89287750dc91cd2


Geunsik Lim (1):
      ftrace: Fix README to state tracing_on to start/stop tracing

Steven Rostedt (1):
      tracing: Fix returning of duplicate data after EOF in trace_pipe_raw

----
 kernel/trace/trace.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] ftrace: Fix README to state tracing_on to start/stop tracing
  2011-10-17 17:49 [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Steven Rostedt
@ 2011-10-17 17:49 ` Steven Rostedt
  2011-10-17 17:49 ` [PATCH 2/2] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw Steven Rostedt
  2011-10-17 18:54 ` [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Ingo Molnar
  2 siblings, 0 replies; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 17:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Geunsik Lim

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

From: Geunsik Lim <geunsik.lim@samsung.com>

tracing_enabled option is deprecated.
To start/stop tracing, write to /sys/kernel/debug/tracing/tracing_on
without tracing_enabled. This patch is based on Linux 3.1.0-rc1

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Link: http://lkml.kernel.org/r/1313127022-23830-1-git-send-email-leemgs1@gmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f86efe9..cea1605 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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
-- 
1.7.6.3



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw
  2011-10-17 17:49 [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Steven Rostedt
  2011-10-17 17:49 ` [PATCH 1/2] ftrace: Fix README to state tracing_on to start/stop tracing Steven Rostedt
@ 2011-10-17 17:49 ` Steven Rostedt
  2011-10-17 18:54 ` [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Ingo Molnar
  2 siblings, 0 replies; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 17:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, stable

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The trace_pipe_raw handler holds a cached page from the time the file
is opened to the time it is closed. The cached page is used to handle
the case of the user space buffer being smaller than what was read from
the ring buffer. The left over buffer is held in the cache so that the
next read will continue where the data left off.

After EOF is returned (no more data in the buffer), the index of
the cached page is set to zero. If a user app reads the page again
after EOF, the check in the buffer will see that the cached page
is less than page size and will return the cached page again. This
will cause reading the trace_pipe_raw again after EOF to return
duplicate data, making the output look like the time went backwards
but instead data is just repeated.

The fix is to not reset the index right after all data is read
from the cache, but to reset it after all data is read and more
data exists in the ring buffer.

Cc: stable <stable@kernel.org>
Reported-by: Jeremy Eder <jeder@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index cea1605..b24a72d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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,
@@ -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)
-- 
1.7.6.3



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 17:49 [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Steven Rostedt
  2011-10-17 17:49 ` [PATCH 1/2] ftrace: Fix README to state tracing_on to start/stop tracing Steven Rostedt
  2011-10-17 17:49 ` [PATCH 2/2] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw Steven Rostedt
@ 2011-10-17 18:54 ` Ingo Molnar
  2011-10-17 19:10   ` Steven Rostedt
  2 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2011-10-17 18:54 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> Please pull the latest tip/perf/core tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> tip/perf/core
> 
> Head SHA1: 436fc280261dcfce5af38f08b89287750dc91cd2
> 
> 
> Geunsik Lim (1):
>       ftrace: Fix README to state tracing_on to start/stop tracing
> 
> Steven Rostedt (1):
>       tracing: Fix returning of duplicate data after EOF in trace_pipe_raw
> 
> ----
>  kernel/trace/trace.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

Pulled, thanks Steve.

How about the m32r build fix? I think we should apply it to perf/core 
if everyone else was fine with your fix.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 18:54 ` [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Ingo Molnar
@ 2011-10-17 19:10   ` Steven Rostedt
  2011-10-17 19:40     ` Ingo Molnar
  0 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 19:10 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Andrew Morton

On Mon, 2011-10-17 at 20:54 +0200, Ingo Molnar wrote:

> How about the m32r build fix? I think we should apply it to perf/core 
> if everyone else was fine with your fix.

Hmm, I saw a notice that Andrew pulled it into his -mm tree. Is it going
that way?

Thanks!

-- Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 19:10   ` Steven Rostedt
@ 2011-10-17 19:40     ` Ingo Molnar
  2011-10-17 20:05       ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2011-10-17 19:40 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Mon, 2011-10-17 at 20:54 +0200, Ingo Molnar wrote:
> 
> > How about the m32r build fix? I think we should apply it to 
> > perf/core if everyone else was fine with your fix.
> 
> Hmm, I saw a notice that Andrew pulled it into his -mm tree. Is it 
> going that way?

No. It must go into perf/core to not open up a wide bisection 
breakage window. So please apply if it everyone is happy with it.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 19:40     ` Ingo Molnar
@ 2011-10-17 20:05       ` Steven Rostedt
  2011-10-17 20:12         ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 20:05 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Andrew Morton, Hirokazu Takata

On Mon, 2011-10-17 at 21:40 +0200, Ingo Molnar wrote:
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > On Mon, 2011-10-17 at 20:54 +0200, Ingo Molnar wrote:
> > 
> > > How about the m32r build fix? I think we should apply it to 
> > > perf/core if everyone else was fine with your fix.
> > 
> > Hmm, I saw a notice that Andrew pulled it into his -mm tree. Is it 
> > going that way?
> 
> No. It must go into perf/core to not open up a wide bisection 
> breakage window. So please apply if it everyone is happy with it.
> 

I could add it, but we should have an Acked-by from Hirokazu Takata.

I would also be interested in knowing if the latest kernel is running on
any m32r hardware at the moment? There doesn't look to be much
development on the m32r arch.

-- Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 20:05       ` Steven Rostedt
@ 2011-10-17 20:12         ` Steven Rostedt
  2011-10-17 21:26           ` David Rientjes
  0 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2011-10-17 20:12 UTC (permalink / raw)
  To: Hirokazu Takata; +Cc: linux-kernel, Andrew Morton, Hirokazu Takata, Ingo Molnar

Takata san,


On Mon, 2011-10-17 at 16:05 -0400, Steven Rostedt wrote:

> I could add it, but we should have an Acked-by from Hirokazu Takata.


Here's the patch I'm referring to:

https://lkml.org/lkml/2011/10/13/259

Thanks!

-- Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 20:12         ` Steven Rostedt
@ 2011-10-17 21:26           ` David Rientjes
  2011-10-18  0:09             ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: David Rientjes @ 2011-10-17 21:26 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Hirokazu Takata, linux-kernel, Andrew Morton, Ingo Molnar

On Mon, 17 Oct 2011, Steven Rostedt wrote:

> > I could add it, but we should have an Acked-by from Hirokazu Takata.
> 
> 
> Here's the patch I'm referring to:
> 
> https://lkml.org/lkml/2011/10/13/259
> 
> Thanks!
> 

This patch makes my m32r cross-compiler happy, so for that:

Acked-by: David Rientjes <rientjes@google.com>

although the "Link:" field in that patch doesn't work for me.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-17 21:26           ` David Rientjes
@ 2011-10-18  0:09             ` Steven Rostedt
  2011-10-18  3:16               ` Hirokazu Takata
  0 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2011-10-18  0:09 UTC (permalink / raw)
  To: David Rientjes; +Cc: Hirokazu Takata, linux-kernel, Andrew Morton, Ingo Molnar

On Mon, 2011-10-17 at 14:26 -0700, David Rientjes wrote:
> On Mon, 17 Oct 2011, Steven Rostedt wrote:
> 
> > > I could add it, but we should have an Acked-by from Hirokazu Takata.
> > 
> > 
> > Here's the patch I'm referring to:
> > 
> > https://lkml.org/lkml/2011/10/13/259
> > 
> > Thanks!
> > 
> 
> This patch makes my m32r cross-compiler happy, so for that:
> 
> Acked-by: David Rientjes <rientjes@google.com>
> 
> although the "Link:" field in that patch doesn't work for me.

OK, I'll add it with your Ack and a Cc to Hirokazu.

As for the link, it will work again when kernel.org has that operational
again.

The Link: format is:

Link: http://lkml.kernel.org/r/<message-id>

You can also find this at:

http://marc.info/?i=<message-id>

which would give you:

http://marc.info/?i=20111013085936.GA13046@elte.hu

-- Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
  2011-10-18  0:09             ` Steven Rostedt
@ 2011-10-18  3:16               ` Hirokazu Takata
  0 siblings, 0 replies; 11+ messages in thread
From: Hirokazu Takata @ 2011-10-18  3:16 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: David Rientjes, Hirokazu Takata, linux-kernel, Andrew Morton,
	Ingo Molnar

Acked-by: Hirokazu Takata <takata@linux-m32r.org>

Thank you.

-- Takata

From: Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes
Date: Mon, 17 Oct 2011 20:09:49 -0400
> On Mon, 2011-10-17 at 14:26 -0700, David Rientjes wrote:
> > On Mon, 17 Oct 2011, Steven Rostedt wrote:
> > 
> > > > I could add it, but we should have an Acked-by from Hirokazu Takata.
> > > 
> > > 
> > > Here's the patch I'm referring to:
> > > 
> > > https://lkml.org/lkml/2011/10/13/259
> > > 
> > > Thanks!
> > > 
> > 
> > This patch makes my m32r cross-compiler happy, so for that:
> > 
> > Acked-by: David Rientjes <rientjes@google.com>
> > 
> > although the "Link:" field in that patch doesn't work for me.
> 
> OK, I'll add it with your Ack and a Cc to Hirokazu.
> 
> As for the link, it will work again when kernel.org has that operational
> again.
> 
> The Link: format is:
> 
> Link: http://lkml.kernel.org/r/<message-id>
> 
> You can also find this at:
> 
> http://marc.info/?i=<message-id>
> 
> which would give you:
> 
> http://marc.info/?i=20111013085936.GA13046@elte.hu
> 
> -- Steve
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-10-18  3:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-17 17:49 [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Steven Rostedt
2011-10-17 17:49 ` [PATCH 1/2] ftrace: Fix README to state tracing_on to start/stop tracing Steven Rostedt
2011-10-17 17:49 ` [PATCH 2/2] tracing: Fix returning of duplicate data after EOF in trace_pipe_raw Steven Rostedt
2011-10-17 18:54 ` [PATCH 0/2] [GIT PULL][v3.2] tracing: various fixes Ingo Molnar
2011-10-17 19:10   ` Steven Rostedt
2011-10-17 19:40     ` Ingo Molnar
2011-10-17 20:05       ` Steven Rostedt
2011-10-17 20:12         ` Steven Rostedt
2011-10-17 21:26           ` David Rientjes
2011-10-18  0:09             ` Steven Rostedt
2011-10-18  3:16               ` Hirokazu Takata

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.