public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: kill wrong message when cat tracing/trace
@ 2010-04-05  9:11 Lai Jiangshan
  2010-04-05 14:52 ` Steven Rostedt
  2010-04-14 15:00 ` [tip:tracing/core] tracing: Fix uninitialized variable of tracing/trace output tip-bot for Lai Jiangshan
  0 siblings, 2 replies; 3+ messages in thread
From: Lai Jiangshan @ 2010-04-05  9:11 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, LKML

Because of a local variable is not initialized, I got these
when I did 'cat tracing/trace'. (not trace_pipe):

CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770221: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446612133255294080 EVENTS]
              ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770222: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770222: lock_release: ffffffff816cfb98 dcache_lock

See peek_next_entry(), it does not set *lost_events when we 'cat tracing/trace'

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0498beb..b9be232 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1571,7 +1571,7 @@ __find_next_entry(struct trace_iterator *iter, int *ent_cpu,
 {
 	struct ring_buffer *buffer = iter->tr->buffer;
 	struct trace_entry *ent, *next = NULL;
-	unsigned long lost_events, next_lost = 0;
+	unsigned long lost_events = 0, next_lost = 0;
 	int cpu_file = iter->cpu_file;
 	u64 next_ts = 0, ts;
 	int next_cpu = -1;


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

* Re: [PATCH] tracing: kill wrong message when cat tracing/trace
  2010-04-05  9:11 [PATCH] tracing: kill wrong message when cat tracing/trace Lai Jiangshan
@ 2010-04-05 14:52 ` Steven Rostedt
  2010-04-14 15:00 ` [tip:tracing/core] tracing: Fix uninitialized variable of tracing/trace output tip-bot for Lai Jiangshan
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2010-04-05 14:52 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, LKML

On Mon, 2010-04-05 at 17:11 +0800, Lai Jiangshan wrote:
> Because of a local variable is not initialized, I got these
> when I did 'cat tracing/trace'. (not trace_pipe):
> 
> CPU:0 [LOST 18446744071579453134 EVENTS]
>               ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
> CPU:0 [LOST 18446744071579453134 EVENTS]
>               ps-3099  [000]   560.770221: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
> CPU:0 [LOST 18446612133255294080 EVENTS]
>               ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
> CPU:0 [LOST 18446744071579453134 EVENTS]
>               ps-3099  [000]   560.770222: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
> CPU:0 [LOST 18446744071579453134 EVENTS]
>               ps-3099  [000]   560.770222: lock_release: ffffffff816cfb98 dcache_lock
> 
> See peek_next_entry(), it does not set *lost_events when we 'cat tracing/trace'
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Applied, Thanks Lai!

-- Steve



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

* [tip:tracing/core] tracing: Fix uninitialized variable of tracing/trace output
  2010-04-05  9:11 [PATCH] tracing: kill wrong message when cat tracing/trace Lai Jiangshan
  2010-04-05 14:52 ` Steven Rostedt
@ 2010-04-14 15:00 ` tip-bot for Lai Jiangshan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Lai Jiangshan @ 2010-04-14 15:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, tglx, laijs

Commit-ID:  aa27497c2fb4c7f57706099bd489e683e5cc3e3b
Gitweb:     http://git.kernel.org/tip/aa27497c2fb4c7f57706099bd489e683e5cc3e3b
Author:     Lai Jiangshan <laijs@cn.fujitsu.com>
AuthorDate: Mon, 5 Apr 2010 17:11:05 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Mon, 5 Apr 2010 11:01:22 -0400

tracing: Fix uninitialized variable of tracing/trace output

Because a local variable is not initialized, I got these
when I did 'cat tracing/trace'. (not trace_pipe):

CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770221: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446612133255294080 EVENTS]
              ps-3099  [000]   560.770221: lock_acquire: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770222: lock_release: ffff880030865010 &(&dentry->d_lock)->rlock
CPU:0 [LOST 18446744071579453134 EVENTS]
              ps-3099  [000]   560.770222: lock_release: ffffffff816cfb98 dcache_lock

See peek_next_entry(), it does not set *lost_events when we 'cat tracing/trace'

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4BB9A929.2000303@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0498beb..b9be232 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1571,7 +1571,7 @@ __find_next_entry(struct trace_iterator *iter, int *ent_cpu,
 {
 	struct ring_buffer *buffer = iter->tr->buffer;
 	struct trace_entry *ent, *next = NULL;
-	unsigned long lost_events, next_lost = 0;
+	unsigned long lost_events = 0, next_lost = 0;
 	int cpu_file = iter->cpu_file;
 	u64 next_ts = 0, ts;
 	int next_cpu = -1;

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

end of thread, other threads:[~2010-04-14 15:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05  9:11 [PATCH] tracing: kill wrong message when cat tracing/trace Lai Jiangshan
2010-04-05 14:52 ` Steven Rostedt
2010-04-14 15:00 ` [tip:tracing/core] tracing: Fix uninitialized variable of tracing/trace output tip-bot for Lai Jiangshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox