public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf probe: Fix build failure
@ 2010-01-14  3:03 Li Zefan
  2010-01-14  4:51 ` Masami Hiramatsu
  0 siblings, 1 reply; 5+ messages in thread
From: Li Zefan @ 2010-01-14  3:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Masami Hiramatsu, LKML

builtin-probe.c:121: error: 'opt_show_lines' defined but not used

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 tools/perf/builtin-probe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 1d3a99e..9be8063 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -118,6 +118,7 @@ static int opt_del_probe_event(const struct option *opt __used,
 	return 0;
 }
 
+#ifndef NO_LIBDWARF
 static int opt_show_lines(const struct option *opt __used,
 			  const char *str, int unset __used)
 {
@@ -127,6 +128,8 @@ static int opt_show_lines(const struct option *opt __used,
 	session.show_lines = true;
 	return 0;
 }
+#endif
+
 /* Currently just checking function name from symbol map */
 static void evaluate_probe_point(struct probe_point *pp)
 {
-- 
1.6.3

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

* Re: [PATCH] perf probe: Fix build failure
  2010-01-14  3:03 [PATCH] perf probe: Fix build failure Li Zefan
@ 2010-01-14  4:51 ` Masami Hiramatsu
  2010-01-14  5:23   ` Li Zefan
  0 siblings, 1 reply; 5+ messages in thread
From: Masami Hiramatsu @ 2010-01-14  4:51 UTC (permalink / raw)
  To: Li Zefan; +Cc: Ingo Molnar, LKML

Hi,

Thank you, the patch code looks good to me.

Li Zefan wrote:
> builtin-probe.c:121: error: 'opt_show_lines' defined but not used

Please add some comment for explanation, like:

This build error occurs when compiling perf-tools without dwarf
support (no libdwarf).

> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
>  tools/perf/builtin-probe.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> index 1d3a99e..9be8063 100644
> --- a/tools/perf/builtin-probe.c
> +++ b/tools/perf/builtin-probe.c
> @@ -118,6 +118,7 @@ static int opt_del_probe_event(const struct option *opt __used,
>  	return 0;
>  }
>  
> +#ifndef NO_LIBDWARF
>  static int opt_show_lines(const struct option *opt __used,
>  			  const char *str, int unset __used)
>  {
> @@ -127,6 +128,8 @@ static int opt_show_lines(const struct option *opt __used,
>  	session.show_lines = true;
>  	return 0;
>  }
> +#endif
> +
>  /* Currently just checking function name from symbol map */
>  static void evaluate_probe_point(struct probe_point *pp)
>  {

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


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

* Re: [PATCH] perf probe: Fix build failure
  2010-01-14  4:51 ` Masami Hiramatsu
@ 2010-01-14  5:23   ` Li Zefan
  2010-01-14  6:20     ` Masami Hiramatsu
  0 siblings, 1 reply; 5+ messages in thread
From: Li Zefan @ 2010-01-14  5:23 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Ingo Molnar, LKML

Masami Hiramatsu wrote:
> Hi,
> 
> Thank you, the patch code looks good to me.
> 
> Li Zefan wrote:
>> builtin-probe.c:121: error: 'opt_show_lines' defined but not used
> 
> Please add some comment for explanation, like:
> 
> This build error occurs when compiling perf-tools without dwarf
> support (no libdwarf).
> 

But as simple as this patch, the code itself has explained
the cause of this compile error.


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

* Re: [PATCH] perf probe: Fix build failure
  2010-01-14  5:23   ` Li Zefan
@ 2010-01-14  6:20     ` Masami Hiramatsu
  2010-01-14  6:30       ` Li Zefan
  0 siblings, 1 reply; 5+ messages in thread
From: Masami Hiramatsu @ 2010-01-14  6:20 UTC (permalink / raw)
  To: Li Zefan; +Cc: Ingo Molnar, LKML

Li Zefan wrote:
> Masami Hiramatsu wrote:
>> Hi,
>>
>> Thank you, the patch code looks good to me.
>>
>> Li Zefan wrote:
>>> builtin-probe.c:121: error: 'opt_show_lines' defined but not used
>>
>> Please add some comment for explanation, like:
>>
>> This build error occurs when compiling perf-tools without dwarf
>> support (no libdwarf).
>>
> 
> But as simple as this patch, the code itself has explained
> the cause of this compile error.

If someone looks git-log afterwords, below message seems too
short.
---
perf probe: Fix build failure

builtin-probe.c:121: error: 'opt_show_lines' defined but not used
---
Especially, if there is libdwarf, we will not see above error. So
IMHO, at least we'd better add a comment about how the error occurs.

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com


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

* Re: [PATCH] perf probe: Fix build failure
  2010-01-14  6:20     ` Masami Hiramatsu
@ 2010-01-14  6:30       ` Li Zefan
  0 siblings, 0 replies; 5+ messages in thread
From: Li Zefan @ 2010-01-14  6:30 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Ingo Molnar, LKML

>>>> builtin-probe.c:121: error: 'opt_show_lines' defined but not used
>>> Please add some comment for explanation, like:
>>>
>>> This build error occurs when compiling perf-tools without dwarf
>>> support (no libdwarf).
>>>
>> But as simple as this patch, the code itself has explained
>> the cause of this compile error.
> 
> If someone looks git-log afterwords, below message seems too
> short.
> ---
> perf probe: Fix build failure
> 
> builtin-probe.c:121: error: 'opt_show_lines' defined but not used
> ---
> Especially, if there is libdwarf, we will not see above error. So
> IMHO, at least we'd better add a comment about how the error occurs.
> 

Fair enough, here's the updated patch, and I guess I can
add you acked-by.

=============

From: Li Zefan <lizf@cn.fujitsu.com>
Subject: [PATCH] perf probe: Fix build failure

When compiling perf-tools without dwarf support, I ran into this:

builtin-probe.c:121: error: 'opt_show_lines' defined but not used

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
---
 tools/perf/builtin-probe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 1d3a99e..9be8063 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -118,6 +118,7 @@ static int opt_del_probe_event(const struct option *opt __used,
 	return 0;
 }
 
+#ifndef NO_LIBDWARF
 static int opt_show_lines(const struct option *opt __used,
 			  const char *str, int unset __used)
 {
@@ -127,6 +128,8 @@ static int opt_show_lines(const struct option *opt __used,
 	session.show_lines = true;
 	return 0;
 }
+#endif
+
 /* Currently just checking function name from symbol map */
 static void evaluate_probe_point(struct probe_point *pp)
 {
-- 
1.6.3


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

end of thread, other threads:[~2010-01-14  6:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-14  3:03 [PATCH] perf probe: Fix build failure Li Zefan
2010-01-14  4:51 ` Masami Hiramatsu
2010-01-14  5:23   ` Li Zefan
2010-01-14  6:20     ` Masami Hiramatsu
2010-01-14  6:30       ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox