From 1c1a3a4729aae712c55e001e151ef008d030d4a7 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 12 Jul 2016 12:19:09 -0300 Subject: 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 Cc: Ananth N Mavinakayanahalli Cc: Brendan Gregg Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-82lh22ybedy9b9lych8xj12g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/probe-file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util/probe-file.c') diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c index 98398b55a03f..e705a742ee1e 100644 --- a/tools/perf/util/probe-file.c +++ b/tools/perf/util/probe-file.c @@ -624,6 +624,7 @@ out_err: return ret; } +#ifdef HAVE_GELF_GETNOTE_SUPPORT static unsigned long long sdt_note__get_addr(struct sdt_note *note) { return note->bit32 ? (unsigned long long)note->addr.a32[0] @@ -682,6 +683,7 @@ int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname) cleanup_sdt_note_list(&sdtlist); return ret; } +#endif static int probe_cache_entry__write(struct probe_cache_entry *entry, int fd) { -- cgit v1.2.3