All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable()
@ 2010-02-24  7:40 Wenji Huang
  2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
  2010-02-26  9:28 ` [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable() tip-bot for Wenji Huang
  0 siblings, 2 replies; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: fweisbec, rostedt, Wenji Huang

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_syscalls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 6cce6a8..9d45122 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -552,7 +552,7 @@ int prof_sysexit_enable(struct ftrace_event_call *call)
 		ret = register_trace_sys_exit(prof_syscall_exit);
 	if (ret) {
 		pr_info("event trace: Could not activate"
-				"syscall entry trace point");
+				"syscall exit trace point");
 	} else {
 		set_bit(num, enabled_prof_exit_syscalls);
 		sys_prof_refcount_exit++;
-- 
1.5.6


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

* [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c
  2010-02-24  7:40 [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable() Wenji Huang
@ 2010-02-24  7:40 ` Wenji Huang
  2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
  2010-02-26  9:28   ` [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c tip-bot for Wenji Huang
  2010-02-26  9:28 ` [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable() tip-bot for Wenji Huang
  1 sibling, 2 replies; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: fweisbec, rostedt, Wenji Huang

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_kprobe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index a718cd1..505c922 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -635,12 +635,12 @@ static int create_trace_probe(int argc, char **argv)
 			event = strchr(group, '/') + 1;
 			event[-1] = '\0';
 			if (strlen(group) == 0) {
-				pr_info("Group name is not specifiled\n");
+				pr_info("Group name is not specified\n");
 				return -EINVAL;
 			}
 		}
 		if (strlen(event) == 0) {
-			pr_info("Event name is not specifiled\n");
+			pr_info("Event name is not specified\n");
 			return -EINVAL;
 		}
 	}
-- 
1.5.6


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

* [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return
  2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
@ 2010-02-24  7:40   ` Wenji Huang
  2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
  2010-02-26  9:28     ` [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return tip-bot for Wenji Huang
  2010-02-26  9:28   ` [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c tip-bot for Wenji Huang
  1 sibling, 2 replies; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: fweisbec, rostedt, Wenji Huang

Remove the local variable of the same name cpu in branch.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_functions_graph.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 616b135..112561d 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -855,7 +855,6 @@ print_graph_return(struct ftrace_graph_ret *trace, struct trace_seq *s,
 	int i;
 
 	if (data) {
-		int cpu = iter->cpu;
 		int *depth = &(per_cpu_ptr(data->cpu_data, cpu)->depth);
 
 		/*
-- 
1.5.6


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

* [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue
  2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
@ 2010-02-24  7:40     ` Wenji Huang
  2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
  2010-02-25  4:18       ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
  2010-02-26  9:28     ` [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return tip-bot for Wenji Huang
  1 sibling, 2 replies; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: fweisbec, rostedt, Wenji Huang

Return TRACE_TYPE_HANDLED instead of zero to avoid confusion.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_functions_graph.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 112561d..bd0bdeb 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -806,7 +806,7 @@ print_graph_prologue(struct trace_iterator *iter, struct trace_seq *s,
 			return TRACE_TYPE_PARTIAL_LINE;
 	}
 
-	return 0;
+	return TRACE_TYPE_HANDLED;
 }
 
 static enum print_line_t
-- 
1.5.6


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

* [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
  2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
@ 2010-02-24  7:40       ` Wenji Huang
  2010-02-24  8:04         ` Li Zefan
  2010-02-26  9:29         ` [tip:tracing/core] tracing: Simplify " tip-bot for Wenji Huang
  2010-02-25  4:18       ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
  1 sibling, 2 replies; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: fweisbec, rostedt, Wenji Huang

Discard freeing field->type since it's not necessary and may be hazard.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
---
 kernel/trace/trace_events.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index c2a3077..3f972ad 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -60,10 +60,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
 	return 0;
 
 err:
-	if (field) {
+	if (field)
 		kfree(field->name);
-		kfree(field->type);
-	}
 	kfree(field);
 
 	return -ENOMEM;
-- 
1.5.6


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

* Re: [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
  2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
@ 2010-02-24  8:04         ` Li Zefan
  2010-02-24  8:21           ` Wenji Huang
  2010-02-26  9:29         ` [tip:tracing/core] tracing: Simplify " tip-bot for Wenji Huang
  1 sibling, 1 reply; 14+ messages in thread
From: Li Zefan @ 2010-02-24  8:04 UTC (permalink / raw)
  To: Wenji Huang; +Cc: linux-kernel, fweisbec, rostedt

Wenji Huang wrote:
> Discard freeing field->type since it's not necessary and may be hazard.
> 

It's redundant, but it's safe, because if we run into this failure path,
field->type is always NULL.

> Signed-off-by: Wenji Huang <wenji.huang@oracle.com>

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>

> ---
>  kernel/trace/trace_events.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index c2a3077..3f972ad 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -60,10 +60,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
>  	return 0;
>  
>  err:
> -	if (field) {
> +	if (field)
>  		kfree(field->name);
> -		kfree(field->type);
> -	}
>  	kfree(field);
>  
>  	return -ENOMEM;

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

* Re: [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
  2010-02-24  8:04         ` Li Zefan
@ 2010-02-24  8:21           ` Wenji Huang
  2010-02-24  8:26             ` Li Zefan
  0 siblings, 1 reply; 14+ messages in thread
From: Wenji Huang @ 2010-02-24  8:21 UTC (permalink / raw)
  To: Li Zefan; +Cc: linux-kernel, fweisbec, rostedt

On 02/24/2010 04:04 PM, Li Zefan wrote:
> Wenji Huang wrote:
>> Discard freeing field->type since it's not necessary and may be hazard.
>>
>
> It's redundant, but it's safe, because if we run into this failure path,
> field->type is always NULL.

There are two entries to failure path, field->name == NULL or
field->type == NULL. And allocating for field->name is before field->type.

IMHO, field->type is not fixed after initialization, it's
not safe if field->name==NULL goes to failure path.

Regards,
Wenji
>
>> Signed-off-by: Wenji Huang<wenji.huang@oracle.com>
>
> Reviewed-by: Li Zefan<lizf@cn.fujitsu.com>
>
>> ---
>>   kernel/trace/trace_events.c |    4 +---
>>   1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
>> index c2a3077..3f972ad 100644
>> --- a/kernel/trace/trace_events.c
>> +++ b/kernel/trace/trace_events.c
>> @@ -60,10 +60,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
>>   	return 0;
>>
>>   err:
>> -	if (field) {
>> +	if (field)
>>   		kfree(field->name);
>> -		kfree(field->type);
>> -	}
>>   	kfree(field);
>>
>>   	return -ENOMEM;


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

* Re: [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field
  2010-02-24  8:21           ` Wenji Huang
@ 2010-02-24  8:26             ` Li Zefan
  0 siblings, 0 replies; 14+ messages in thread
From: Li Zefan @ 2010-02-24  8:26 UTC (permalink / raw)
  To: wenji.huang; +Cc: linux-kernel, fweisbec, rostedt

Wenji Huang wrote:
> On 02/24/2010 04:04 PM, Li Zefan wrote:
>> Wenji Huang wrote:
>>> Discard freeing field->type since it's not necessary and may be hazard.
>>>
>>
>> It's redundant, but it's safe, because if we run into this failure path,
>> field->type is always NULL.
> 
> There are two entries to failure path, field->name == NULL or
> field->type == NULL. And allocating for field->name is before field->type.
> 
> IMHO, field->type is not fixed after initialization, it's
> not safe if field->name==NULL goes to failure path.
> 

It's still safe, because field is allocated using kzalloc(). ;)


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

* Re: [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue
  2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
  2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
@ 2010-02-25  4:18       ` Frederic Weisbecker
  2010-02-25 15:35         ` Steven Rostedt
  1 sibling, 1 reply; 14+ messages in thread
From: Frederic Weisbecker @ 2010-02-25  4:18 UTC (permalink / raw)
  To: Wenji Huang; +Cc: linux-kernel, rostedt

On Wed, Feb 24, 2010 at 03:40:25PM +0800, Wenji Huang wrote:
> Return TRACE_TYPE_HANDLED instead of zero to avoid confusion.
> 
> Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
> ---
>  kernel/trace/trace_functions_graph.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index 112561d..bd0bdeb 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -806,7 +806,7 @@ print_graph_prologue(struct trace_iterator *iter, struct trace_seq *s,
>  			return TRACE_TYPE_PARTIAL_LINE;
>  	}
>  
> -	return 0;
> +	return TRACE_TYPE_HANDLED;


Actually TRACE_TYPE_HANDLED = 1
So print_graph_prologue always returns 0.
And the check is inverted everywhere:

	if (print_graph_prologue(...))
		return TRACE_TYPE_PARTIAL_LINE;

Which means we never it fails.

It's not a big deal because there will always be something
else to print after the prologue, and this will fail too
and then return the error.

But still, if you fix this, you also need to do:

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 616b135..9da6487 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -819,7 +819,7 @@ print_graph_entry(struct ftrace_graph_ent_entry *field, struct trace_seq *s,
 	static enum print_line_t ret;
 	int cpu = iter->cpu;
 
-	if (print_graph_prologue(iter, s, TRACE_GRAPH_ENT, call->func))
+	if (!print_graph_prologue(iter, s, TRACE_GRAPH_ENT, call->func))
 		return TRACE_TYPE_PARTIAL_LINE;
 
 	leaf_ret = get_return_for_leaf(iter, field);
@@ -866,7 +866,7 @@ print_graph_return(struct ftrace_graph_ret *trace, struct trace_seq *s,
 		*depth = trace->depth - 1;
 	}
 
-	if (print_graph_prologue(iter, s, 0, 0))
+	if (!print_graph_prologue(iter, s, 0, 0))
 		return TRACE_TYPE_PARTIAL_LINE;
 
 	/* Overhead */
@@ -921,7 +921,7 @@ print_graph_comment(struct trace_seq *s,  struct trace_entry *ent,
 	if (data)
 		depth = per_cpu_ptr(data->cpu_data, iter->cpu)->depth;
 
-	if (print_graph_prologue(iter, s, 0, 0))
+	if (!print_graph_prologue(iter, s, 0, 0))
 		return TRACE_TYPE_PARTIAL_LINE;
 
 	/* No overhead */



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

* Re: [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue
  2010-02-25  4:18       ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
@ 2010-02-25 15:35         ` Steven Rostedt
  0 siblings, 0 replies; 14+ messages in thread
From: Steven Rostedt @ 2010-02-25 15:35 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: Wenji Huang, linux-kernel

On Thu, 2010-02-25 at 05:18 +0100, Frederic Weisbecker wrote:
> On Wed, Feb 24, 2010 at 03:40:25PM +0800, Wenji Huang wrote:
> > Return TRACE_TYPE_HANDLED instead of zero to avoid confusion.
> > 
> > Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
> > ---


> It's not a big deal because there will always be something
> else to print after the prologue, and this will fail too
> and then return the error.

I'll apply the rest of the series and leave this patch out.

-- Steve



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

* [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable()
  2010-02-24  7:40 [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable() Wenji Huang
  2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
@ 2010-02-26  9:28 ` tip-bot for Wenji Huang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Wenji Huang @ 2010-02-26  9:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, wenji.huang, tglx

Commit-ID:  6574658b3bc7c408581629de5efb809f125cce8c
Gitweb:     http://git.kernel.org/tip/6574658b3bc7c408581629de5efb809f125cce8c
Author:     Wenji Huang <wenji.huang@oracle.com>
AuthorDate: Wed, 24 Feb 2010 15:40:22 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 25 Feb 2010 10:35:55 -0500

tracing: Fix typo in prof_sysexit_enable()

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
LKML-Reference: <1266997226-6833-1-git-send-email-wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_syscalls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 49cea70..8cdda95 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -603,7 +603,7 @@ int prof_sysexit_enable(struct ftrace_event_call *call)
 		ret = register_trace_sys_exit(prof_syscall_exit);
 	if (ret) {
 		pr_info("event trace: Could not activate"
-				"syscall entry trace point");
+				"syscall exit trace point");
 	} else {
 		set_bit(num, enabled_prof_exit_syscalls);
 		sys_prof_refcount_exit++;

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

* [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c
  2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
  2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
@ 2010-02-26  9:28   ` tip-bot for Wenji Huang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Wenji Huang @ 2010-02-26  9:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, wenji.huang, tglx

Commit-ID:  a5efd925115cbc1f90195dca9a25f7b8daa10c37
Gitweb:     http://git.kernel.org/tip/a5efd925115cbc1f90195dca9a25f7b8daa10c37
Author:     Wenji Huang <wenji.huang@oracle.com>
AuthorDate: Wed, 24 Feb 2010 15:40:23 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 25 Feb 2010 10:36:29 -0500

tracing: Fix typo of info text in trace_kprobe.c

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
LKML-Reference: <1266997226-6833-2-git-send-email-wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_kprobe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index c990299..8d4bd16 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -651,12 +651,12 @@ static int create_trace_probe(int argc, char **argv)
 			event = strchr(group, '/') + 1;
 			event[-1] = '\0';
 			if (strlen(group) == 0) {
-				pr_info("Group name is not specifiled\n");
+				pr_info("Group name is not specified\n");
 				return -EINVAL;
 			}
 		}
 		if (strlen(event) == 0) {
-			pr_info("Event name is not specifiled\n");
+			pr_info("Event name is not specified\n");
 			return -EINVAL;
 		}
 	}

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

* [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return
  2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
  2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
@ 2010-02-26  9:28     ` tip-bot for Wenji Huang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Wenji Huang @ 2010-02-26  9:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, wenji.huang, tglx

Commit-ID:  c85f3a91f84d5a85f179c2504bb7a39370c82b41
Gitweb:     http://git.kernel.org/tip/c85f3a91f84d5a85f179c2504bb7a39370c82b41
Author:     Wenji Huang <wenji.huang@oracle.com>
AuthorDate: Wed, 24 Feb 2010 15:40:24 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 25 Feb 2010 10:41:24 -0500

tracing: Remove unnecessary variable in print_graph_return

The "cpu" variable is declared at the start of the function and
also within a branch, with the exact same initialization.

Remove the local variable of the same name in the branch.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
LKML-Reference: <1266997226-6833-3-git-send-email-wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_functions_graph.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 616b135..112561d 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -855,7 +855,6 @@ print_graph_return(struct ftrace_graph_ret *trace, struct trace_seq *s,
 	int i;
 
 	if (data) {
-		int cpu = iter->cpu;
 		int *depth = &(per_cpu_ptr(data->cpu_data, cpu)->depth);
 
 		/*

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

* [tip:tracing/core] tracing: Simplify memory recycle of trace_define_field
  2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
  2010-02-24  8:04         ` Li Zefan
@ 2010-02-26  9:29         ` tip-bot for Wenji Huang
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Wenji Huang @ 2010-02-26  9:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, rostedt, lizf, wenji.huang, tglx

Commit-ID:  7b60997f73865b019e595720185c85285ca3df9a
Gitweb:     http://git.kernel.org/tip/7b60997f73865b019e595720185c85285ca3df9a
Author:     Wenji Huang <wenji.huang@oracle.com>
AuthorDate: Wed, 24 Feb 2010 15:40:26 +0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 25 Feb 2010 10:42:55 -0500

tracing: Simplify memory recycle of trace_define_field

Discard freeing field->type since it is not necessary.

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
LKML-Reference: <1266997226-6833-5-git-send-email-wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_events.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index c2a3077..3f972ad 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -60,10 +60,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
 	return 0;
 
 err:
-	if (field) {
+	if (field)
 		kfree(field->name);
-		kfree(field->type);
-	}
 	kfree(field);
 
 	return -ENOMEM;

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

end of thread, other threads:[~2010-02-26  9:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24  7:40 [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable() Wenji Huang
2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
2010-02-24  8:04         ` Li Zefan
2010-02-24  8:21           ` Wenji Huang
2010-02-24  8:26             ` Li Zefan
2010-02-26  9:29         ` [tip:tracing/core] tracing: Simplify " tip-bot for Wenji Huang
2010-02-25  4:18       ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
2010-02-25 15:35         ` Steven Rostedt
2010-02-26  9:28     ` [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return tip-bot for Wenji Huang
2010-02-26  9:28   ` [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c tip-bot for Wenji Huang
2010-02-26  9:28 ` [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable() tip-bot for Wenji Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.