From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964933AbcCKIqM (ORCPT ); Fri, 11 Mar 2016 03:46:12 -0500 Received: from torg.zytor.com ([198.137.202.12]:33134 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964798AbcCKIqF (ORCPT ); Fri, 11 Mar 2016 03:46:05 -0500 Date: Fri, 11 Mar 2016 00:45:38 -0800 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: wangnan0@huawei.com, eranian@google.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, namhyung@kernel.org, mingo@kernel.org, acme@redhat.com, adrian.hunter@intel.com, tglx@linutronix.de, hpa@zytor.com Reply-To: namhyung@kernel.org, jolsa@kernel.org, acme@redhat.com, mingo@kernel.org, adrian.hunter@intel.com, hpa@zytor.com, tglx@linutronix.de, wangnan0@huawei.com, linux-kernel@vger.kernel.org, eranian@google.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf jitdump: DWARF is also needed Git-Commit-ID: 46dad054a19297af65c417c97cb920aa5bdf7e8c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 46dad054a19297af65c417c97cb920aa5bdf7e8c Gitweb: http://git.kernel.org/tip/46dad054a19297af65c417c97cb920aa5bdf7e8c Author: Arnaldo Carvalho de Melo AuthorDate: Mon, 7 Mar 2016 18:48:45 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 9 Mar 2016 10:29:03 -0300 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 ^ 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 Cc: Stephane Eranian Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-le498robnmxd40237wej3w62@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-inject.c | 10 +++++----- tools/perf/util/Build | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index b288577..e219ed4 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, return perf_event__repipe_synth(tool, event); } -#ifdef HAVE_LIBELF_SUPPORT +#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT) static int perf_event__drop_oe(struct perf_tool *tool __maybe_unused, union perf_event *event __maybe_unused, struct ordered_events *oe __maybe_unused) @@ -245,7 +245,7 @@ static int perf_event__repipe_mmap(struct perf_tool *tool, return err; } -#ifdef HAVE_LIBELF_SUPPORT +#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT) static int perf_event__jit_repipe_mmap(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, @@ -283,7 +283,7 @@ static int perf_event__repipe_mmap2(struct perf_tool *tool, return err; } -#ifdef HAVE_LIBELF_SUPPORT +#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT) static int perf_event__jit_repipe_mmap2(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, @@ -795,7 +795,7 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused) "perf inject []", NULL }; -#ifndef HAVE_LIBELF_SUPPORT +#if !defined(HAVE_LIBELF_SUPPORT) || !defined(HAVE_DWARF_SUPPORT) set_option_nobuild(options, 'j', "jit", "NO_LIBELF=1", true); #endif 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) inject.tool.ordered_events = true; inject.tool.ordering_requires_timestamps = true; } -#ifdef HAVE_LIBELF_SUPPORT +#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_DWARF_SUPPORT) if (inject.jit_mode) { inject.tool.mmap2 = perf_event__jit_repipe_mmap2; inject.tool.mmap = perf_event__jit_repipe_mmap; diff --git a/tools/perf/util/Build b/tools/perf/util/Build index df2b690..f130ce2 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -107,9 +107,12 @@ libperf-y += scripting-engines/ libperf-$(CONFIG_ZLIB) += zlib.o libperf-$(CONFIG_LZMA) += lzma.o libperf-y += demangle-java.o + +ifdef CONFIG_DWARF libperf-$(CONFIG_LIBELF) += jitdump.o libperf-$(CONFIG_LIBELF) += genelf.o libperf-$(CONFIG_LIBELF) += genelf_debug.o +endif CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" # avoid compiler warnings in 32-bit mode