Skip to content

Commit 38dbe0b

Browse files
Jovi Zhangrostedt
authored andcommitted
tracing: Remove second iterator initializer
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 <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent 8214652 commit 38dbe0b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5030,6 +5030,7 @@ __ftrace_dump(bool disable_tracing, enum ftrace_dump_mode oops_dump_mode)
50305030
if (disable_tracing)
50315031
ftrace_kill();
50325032

5033+
/* Simulate the iterator */
50335034
trace_init_global_iter(&iter);
50345035

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

5044-
/* Simulate the iterator */
5045-
iter.tr = &global_trace;
5046-
iter.trace = current_trace;
5047-
50485045
switch (oops_dump_mode) {
50495046
case DUMP_ALL:
50505047
iter.cpu_file = TRACE_PIPE_ALL_CPU;

0 commit comments

Comments
 (0)