Skip to content

Commit

Permalink
tracing: Remove second iterator initializer
Browse files Browse the repository at this point in the history
The trace iterator is already initialized by trace_init_global_iter(),
so there is no need to initialize it again.

Link: http://lkml.kernel.org/r/CACV3sb+G1YnO6168JhY3dEadmJi58pA5-2cSZT8E0WVHJNFt9Q@mail.gmail.com

Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Jovi Zhang authored and Steven Rostedt committed Jan 29, 2013
1 parent 8214652 commit 38dbe0b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -5030,6 +5030,7 @@ __ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
if (disable_tracing)
ftrace_kill();

/* Simulate the iterator */
trace_init_global_iter(&iter);

for_each_tracing_cpu(cpu) {
Expand All @@ -5041,10 +5042,6 @@ __ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
/* don't look at user memory in panic mode */
trace_flags &= ~TRACE_ITER_SYM_USEROBJ;

/* Simulate the iterator */
iter.tr = &global_trace;
iter.trace = current_trace;

switch (oops_dump_mode) {
case DUMP_ALL:
iter.cpu_file = TRACE_PIPE_ALL_CPU;
Expand Down

0 comments on commit 38dbe0b

Please sign in to comment.