From: Arnaldo Carvalho de Melo Date: Mon, 13 Jan 2014 18:15:25 +0000 (-0300) Subject: perf probe: Fix build when DWARF support libraries not present X-Git-Tag: v3.14-rc1~171^2~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d027ee9b80c30e83769ef306ccfafe483dd1672;p=pandora-kernel.git perf probe: Fix build when DWARF support libraries not present 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 Date: Thu Dec 26 05:41:53 2013 +0000 perf probe: Support basic dwarf-based operations on uprobe events Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-73kc2fopt81517hrdgdra18o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed