ftrace: correct the counter increment for trace_buffer data
PATCH 1/1 ftrace: correct the counter increment for trace_buffer data
In ftrace_dump, for disabling buffer, iter.tr->trace_buffer.data is used. But for enabling, iter.trace_buffer->data is used.
Even though, both point to same buffer, for readability, same convention should be used.
--- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.c +1 -1
@@ -6698,7 +6698,7 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)trace_init_global_iter (&iter);for_each_tracing_cpu (cpu) { -atomic_inc (&per_cpu_ptr (iter.tr->trace_buffer.data, cpu)->disabled); +atomic_inc (&per_cpu_ptr (iter.trace_buffer->data, cpu)->disabled); } old_userobj = trace_flags &TRACE_ITER_SYM_USEROBJ ;
Signature · 5 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/
Steven Rostedt
maintainerQuoted 4 lines · On Mon, 22 Jun 2015 16:55:06 +0530 Umesh Tiwari <[email protected]> wrote:
In
ftrace_dump, for disabling buffer,iter.tr->trace_buffer.datais used. But for enabling,iter.trace_buffer->datais used.
Even though, both point to same buffer, for readability, same convention should be used.
Thanks for the two patches. I'm placing these in my todo list, and hopefully wont forget them. The merge window just opened, which means I wont get to them until after it closes (probably in two weeks). And with vacations coming up, it may be later than that.
Feel free to ping me again in three weeks. Even if you don't, I will eventually get to them, but depending on how much other work piles up, it could take months.
Sorry about the bad timing here.
-- Steve
Quoted 11 lines
Signed-off-by Umesh Tiwari <[email protected]>--- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/trace/trace.c +0
-0
kernel/trace/trace.c void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) · line 6704
Quoted 8 lines
kernel/trace/trace.c +1
-1@@ -6698,7 +6698,7 @@ void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)trace_init_global_iter (&iter);for_each_tracing_cpu (cpu) { -atomic_inc (&per_cpu_ptr (iter.tr->trace_buffer.data, cpu)->disabled); +atomic_inc (&per_cpu_ptr (iter.trace_buffer->data, cpu)->disabled); } old_userobj = trace_flags &TRACE_ITER_SYM_USEROBJ ;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/