aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/build-id.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 12:19:09 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 15:20:41 -0300
commit1c1a3a4729aae712c55e001e151ef008d030d4a7 (patch)
tree62fd90d09b08cf1a48eaa85ea8a21d7b2cc55b5d /tools/perf/util/build-id.c
parentperf intel-pt-decoder: Avoid checking code drift on busibox's diff (diff)
downloadlinux-dev-1c1a3a4729aae712c55e001e151ef008d030d4a7.tar.xz
linux-dev-1c1a3a4729aae712c55e001e151ef008d030d4a7.zip
perf tools: Add feature detection for gelf_getnote()
That is not present on some libelf implementations, such as the one used in Alpine Linux: libelf-0.8.13. This ends up disabling the SDT code, that relies on this function. One alternative would be to provide an weak fallback implementation or the open coded variant used by the buildid sysfs notes reading code. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-82lh22ybedy9b9lych8xj12g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/build-id.c')
-rw-r--r--tools/perf/util/build-id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index e1a16408da9c..1e504e40dac8 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -533,7 +533,7 @@ int build_id_cache__list_build_ids(const char *pathname,
return ret;
}
-#ifdef HAVE_LIBELF_SUPPORT
+#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_GELF_GETNOTE_SUPPORT)
static int build_id_cache__add_sdt_cache(const char *sbuild_id,
const char *realname)
{