Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH 13/38] tools lib traceevent: Shut up plugins make message

2 views
Skip to first unread message

Arnaldo Carvalho de Melo

unread,
Jan 13, 2014, 3:50:01 PM1/13/14
to
From: Jiri Olsa <jo...@redhat.com>

Getting rid of following build output:

$ make O=/tmp/build/perf -C tools/perf/ install-bin
...
make[3]: Nothing to be done for `plugins'.
make[2]: Nothing to be done for `plugins'.
...

which triggers when traceevent library needs to be rebuilt, but we have
plugins built already.

Adding extra 'plugins' target with nop which is visible and triggers in
both Makefile parts (for detached output directory (O=...) the
traceevent Makefile spawns sub make for the build itself).

Reported-by: Arnaldo Carvalho de Melo <ac...@redhat.com>
Signed-off-by: Jiri Olsa <jo...@redhat.com>
Cc: Corey Ashford <cjas...@linux.vnet.ibm.com>
Cc: David Ahern <dsa...@gmail.com>
Cc: Frederic Weisbecker <fwei...@gmail.com>
Cc: Ingo Molnar <mi...@elte.hu>
Cc: Namhyung Kim <namh...@kernel.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zi...@chello.nl>
Cc: Steven Rostedt <ros...@goodmis.org>
Link: http://lkml.kernel.org/r/1388595050-23005-2-...@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <ac...@redhat.com>
---
tools/lib/traceevent/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 76fe0aeb874e..f778d48ac609 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -329,9 +329,12 @@ clean:

endif # skip-makefile

-PHONY += force
+PHONY += force plugins
force:

+plugins:
+ @echo > /dev/null
+
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)
--
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Arnaldo Carvalho de Melo

unread,
Jan 13, 2014, 3:50:01 PM1/13/14
to
From: Arnaldo Carvalho de Melo <ac...@redhat.com>

On a freshly installed system, after libelf-dev is installed we get:

CC /tmp/build/perf/util/probe-event.o
util/probe-event.c: In function ‘try_to_find_probe_trace_events’:
util/probe-event.c:753:46: error: unused parameter ‘target’ [-Werror=unused-parameter]
int max_tevs __maybe_unused, const char *target)
^
CC /tmp/build/perf/util/cgroup.o
util/probe-event.c: At top level:
util/probe-event.c:193:12: error: ‘get_text_start_address’ defined but not used [-Werror=unused-function]
static int get_text_start_address(const char *exec, unsigned long *address)
^
cc1: all warnings being treated as errors
make[1]: *** [/tmp/build/perf/util/probe-event.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2

Fix it by enclosing functions only used when those libraries are installed
under the suitable preprocessor define and using __maybe_unused to a function
that is only built when DWARF support is disabled.

Problem introduced in this changeset:

commit fb7345bbf7fad9bf72ef63a19c707970b9685812
Author: Masami Hiramatsu <masami.hi...@hitachi.com>
Date: Thu Dec 26 05:41:53 2013 +0000

perf probe: Support basic dwarf-based operations on uprobe events

Cc: Adrian Hunter <adrian...@intel.com>
Cc: David Ahern <dsa...@gmail.com>
Cc: Frederic Weisbecker <fwei...@gmail.com>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Masami Hiramatsu <masami.hi...@hitachi.com>
Cc: Mike Galbraith <efa...@gmx.de>
Cc: Namhyung Kim <namh...@kernel.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Stephane Eranian <era...@google.com>
Link: http://lkml.kernel.org/n/tip-73kc2fopt8...@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <ac...@redhat.com>
---
tools/perf/util/probe-event.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 86ed8580c3cb..a4ee6b4a840f 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -172,6 +172,7 @@ const char *kernel_get_module_path(const char *module)
return (dso) ? dso->long_name : NULL;
}

+#ifdef HAVE_DWARF_SUPPORT
/* Copied from unwind.c */
static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep,
GElf_Shdr *shp, const char *name)
@@ -217,6 +218,7 @@ out:
elf_end(elf);
return ret;
}
+#endif

static int init_user_exec(void)
{
@@ -750,7 +752,8 @@ static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp,

static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
struct probe_trace_event **tevs __maybe_unused,
- int max_tevs __maybe_unused, const char *target)
+ int max_tevs __maybe_unused,
+ const char *target __maybe_unused)
{
if (perf_probe_event_need_dwarf(pev)) {
pr_warning("Debuginfo-analysis is not supported.\n");

tip-bot for Arnaldo Carvalho de Melo

unread,
Jan 14, 2014, 11:50:01 AM1/14/14
to
Commit-ID: 1d027ee9b80c30e83769ef306ccfafe483dd1672
Gitweb: http://git.kernel.org/tip/1d027ee9b80c30e83769ef306ccfafe483dd1672
Author: Arnaldo Carvalho de Melo <ac...@redhat.com>
AuthorDate: Mon, 13 Jan 2014 15:15:25 -0300
Committer: Arnaldo Carvalho de Melo <ac...@redhat.com>
CommitDate: Mon, 13 Jan 2014 15:15:25 -0300

perf probe: Fix build when DWARF support libraries not present
index 86ed858..a4ee6b4 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -172,6 +172,7 @@ const char *kernel_get_module_path(const char *module)
return (dso) ? dso->long_name : NULL;
}

+#ifdef HAVE_DWARF_SUPPORT
/* Copied from unwind.c */
static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep,
GElf_Shdr *shp, const char *name)
@@ -217,6 +218,7 @@ out:
elf_end(elf);
return ret;
}
+#endif

static int init_user_exec(void)
{
@@ -750,7 +752,8 @@ static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp,

static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
struct probe_trace_event **tevs __maybe_unused,
- int max_tevs __maybe_unused, const char *target)
+ int max_tevs __maybe_unused,
+ const char *target __maybe_unused)
{
if (perf_probe_event_need_dwarf(pev)) {
pr_warning("Debuginfo-analysis is not supported.\n");
--
0 new messages