linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: fix twice trace iterator init
@ 2013-01-25 10:20 Jovi Zhang
  2013-01-29 14:58 ` Steven Rostedt
  2013-02-03 19:19 ` [tip:perf/core] tracing: Remove second iterator initializer tip-bot for Jovi Zhang
  0 siblings, 2 replies; 3+ messages in thread
From: Jovi Zhang @ 2013-01-25 10:20 UTC (permalink / raw)
  To: LKML, Steven Rostedt, Frederic Weisbecker, Ingo Molnar

>From ac499cd340bf2ba47b3d1dd129a3bb7527c195ae Mon Sep 17 00:00:00 2001
From: Jovi Zhang <bookjovi@gmail.com>
Date: Fri, 25 Jan 2013 18:03:07 +0800
Subject: [PATCH] tracing: fix twice trace iterator init

trace iterator is already inited in trace_init_global_iter,
so there don't need to assign again.

Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
---
 kernel/trace/trace.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e512567..8d99728 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5005,6 +5005,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) {
@@ -5016,10 +5017,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;
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tracing: fix twice trace iterator init
  2013-01-25 10:20 [PATCH] tracing: fix twice trace iterator init Jovi Zhang
@ 2013-01-29 14:58 ` Steven Rostedt
  2013-02-03 19:19 ` [tip:perf/core] tracing: Remove second iterator initializer tip-bot for Jovi Zhang
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-01-29 14:58 UTC (permalink / raw)
  To: Jovi Zhang; +Cc: LKML, Frederic Weisbecker, Ingo Molnar

On Fri, 2013-01-25 at 18:20 +0800, Jovi Zhang wrote:
> >From ac499cd340bf2ba47b3d1dd129a3bb7527c195ae Mon Sep 17 00:00:00 2001
> From: Jovi Zhang <bookjovi@gmail.com>
> Date: Fri, 25 Jan 2013 18:03:07 +0800
> Subject: [PATCH] tracing: fix twice trace iterator init
> 
> trace iterator is already inited in trace_init_global_iter,
> so there don't need to assign again.
> 
> Signed-off-by: Jovi Zhang <bookjovi@gmail.com>

Applied, Thanks Jovi!

-- Steve



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] tracing: Remove second iterator initializer
  2013-01-25 10:20 [PATCH] tracing: fix twice trace iterator init Jovi Zhang
  2013-01-29 14:58 ` Steven Rostedt
@ 2013-02-03 19:19 ` tip-bot for Jovi Zhang
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jovi Zhang @ 2013-02-03 19:19 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, tglx, bookjovi

Commit-ID:  38dbe0b137bfe6ea92be495017885c0785179a02
Gitweb:     http://git.kernel.org/tip/38dbe0b137bfe6ea92be495017885c0785179a02
Author:     Jovi Zhang <bookjovi@gmail.com>
AuthorDate: Fri, 25 Jan 2013 18:03:07 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Tue, 29 Jan 2013 09:57:49 -0500

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 <bookjovi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 07888e1..d399592 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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) {
@@ -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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-03 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 10:20 [PATCH] tracing: fix twice trace iterator init Jovi Zhang
2013-01-29 14:58 ` Steven Rostedt
2013-02-03 19:19 ` [tip:perf/core] tracing: Remove second iterator initializer tip-bot for Jovi Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).