projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff0ff84
)
tracing: Fix uninitialized variable of tracing/trace output
author
Lai Jiangshan
<laijs@cn.fujitsu.com>
Mon, 5 Apr 2010 09:11:05 +0000
(17:11 +0800)
committer
Steven Rostedt
<rostedt@goodmis.org>
Mon, 5 Apr 2010 15:01:22 +0000
(11:01 -0400)
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
patch
|
blob
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 0498bebcbfd15ad7b031e88bc441c3e141394781..b9be232352b81c01b7905d0fb48f22cdab9dd01c 100644
(file)
--- 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;