tracing: kill wrong message when cat tracing/trace
PATCH 1/1 tracing: kill wrong message when cat tracing/trace
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_lockSee peek_next_entry(), it does not set *lost_events when we 'cat tracing/trace'
---
kernel/trace/trace.c +1 -1
@@ -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 ;
Quoted 14 lines · Lai Jiangshan
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
Quoted 3 lines
See
peek_next_entry(), it does not set*lost_eventswhen we 'cat tracing/trace'Signed-off-by Lai Jiangshan <[email protected]>
Applied, Thanks Lai!
-- Steve
[tip:tracing/core] tracing: Fix uninitialized variable of tracing/trace output
In reply to Lai JiangshanCommit-ID: aa27497c2fb4c7f57706099bd489e683e5cc3e3b Gitweb: http://git.kernel.org/tip/aa27497c2fb4c7f57706099bd489e683e5cc3e3b Author: Lai Jiangshan <[email protected]> AuthorDate: Mon, 5 Apr 2010 17:11:05 +0800 Committer: Steven Rostedt <[email protected]> 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_lockSee peek_next_entry(), it does not set *lost_events when we 'cat tracing/trace'
LKML-Reference: <[email protected]>
--- kernel/trace/trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/trace/trace.c +1 -1
@@ -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 ;