aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-03-07 16:48:45 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-03-09 08:29:03 -0500
commit46dad054a19297af65c417c97cb920aa5bdf7e8c (patch)
treea8238a71745133edaf91427fed4c6894bf0ec5a3 /tools/perf/builtin-inject.c
parent3a99e6db539e53cc9c79282e80f8362b0cb96ac8 (diff)
perf jitdump: DWARF is also needed
While building on a Docker container for ubuntu and installing package by package one ends up with: MKDIR /tmp/build/util/ CC /tmp/build/util/genelf.o util/genelf.c:22:19: fatal error: dwarf.h: No such file or directory #include <dwarf.h> ^ compilation terminated. mv: cannot stat '/tmp/build/util/.genelf.o.tmp': No such file or directory Because the jitdump code needs the DWARF related development packages to be installed. So make it dependent on that so that the build can succeed without jitdump support. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Stephane Eranian <eranian@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-le498robnmxd40237wej3w62@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index b2885776b602..e219ed458d97 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -73,7 +73,7 @@ static int perf_event__repipe_oe_synth(struct perf_tool *tool,
73 return perf_event__repipe_synth(tool, event); 73 return perf_event__repipe_synth(tool, event);
74} 74}
75 75
76#ifdef HAVE_LIBELF_SUPPORT 76#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT)
77static int perf_event__drop_oe(struct perf_tool *tool __maybe_unused, 77static int perf_event__drop_oe(struct perf_tool *tool __maybe_unused,
78 union perf_event *event __maybe_unused, 78 union perf_event *event __maybe_unused,
79 struct ordered_events *oe __maybe_unused) 79 struct ordered_events *oe __maybe_unused)
@@ -245,7 +245,7 @@ static int perf_event__repipe_mmap(struct perf_tool *tool,
245 return err; 245 return err;
246} 246}
247 247
248#ifdef HAVE_LIBELF_SUPPORT 248#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT)
249static int perf_event__jit_repipe_mmap(struct perf_tool *tool, 249static int perf_event__jit_repipe_mmap(struct perf_tool *tool,
250 union perf_event *event, 250 union perf_event *event,
251 struct perf_sample *sample, 251 struct perf_sample *sample,
@@ -283,7 +283,7 @@ static int perf_event__repipe_mmap2(struct perf_tool *tool,
283 return err; 283 return err;
284} 284}
285 285
286#ifdef HAVE_LIBELF_SUPPORT 286#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT)
287static int perf_event__jit_repipe_mmap2(struct perf_tool *tool, 287static int perf_event__jit_repipe_mmap2(struct perf_tool *tool,
288 union perf_event *event, 288 union perf_event *event,
289 struct perf_sample *sample, 289 struct perf_sample *sample,
@@ -795,7 +795,7 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
795 "perf inject [<options>]", 795 "perf inject [<options>]",
796 NULL 796 NULL
797 }; 797 };
798#ifndef HAVE_LIBELF_SUPPORT 798#if !defined(HAVE_LIBELF_SUPPORT) || !defined(HAVE_DWARF_SUPPORT)
799 set_option_nobuild(options, 'j', "jit", "NO_LIBELF=1", true); 799 set_option_nobuild(options, 'j', "jit", "NO_LIBELF=1", true);
800#endif 800#endif
801 argc = parse_options(argc, argv, options, inject_usage, 0); 801 argc = parse_options(argc, argv, options, inject_usage, 0);
@@ -833,7 +833,7 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
833 inject.tool.ordered_events = true; 833 inject.tool.ordered_events = true;
834 inject.tool.ordering_requires_timestamps = true; 834 inject.tool.ordering_requires_timestamps = true;
835 } 835 }
836#ifdef HAVE_LIBELF_SUPPORT 836#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT)
837 if (inject.jit_mode) { 837 if (inject.jit_mode) {
838 inject.tool.mmap2 = perf_event__jit_repipe_mmap2; 838 inject.tool.mmap2 = perf_event__jit_repipe_mmap2;
839 inject.tool.mmap = perf_event__jit_repipe_mmap; 839 inject.tool.mmap = perf_event__jit_repipe_mmap;