From 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Fri, 25 Mar 2016 03:53:42 -0300 Subject: Linux-libre 4.5-gnu --- tools/perf/builtin-probe.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'tools/perf/builtin-probe.c') diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 132afc976..9af859b28 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -37,7 +37,7 @@ #include "util/strfilter.h" #include "util/symbol.h" #include "util/debug.h" -#include "util/parse-options.h" +#include #include "util/probe-finder.h" #include "util/probe-event.h" #include "util/probe-file.h" @@ -249,6 +249,9 @@ static int opt_show_vars(const struct option *opt, return ret; } +#else +# define opt_show_lines NULL +# define opt_show_vars NULL #endif static int opt_add_probe_event(const struct option *opt, const char *str, int unset __maybe_unused) @@ -473,7 +476,6 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) opt_add_probe_event), OPT_BOOLEAN('f', "force", &probe_conf.force_add, "forcibly add events" " with existing name"), -#ifdef HAVE_DWARF_SUPPORT OPT_CALLBACK('L', "line", NULL, "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]", "Show source code lines.", opt_show_lines), @@ -490,7 +492,6 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) "directory", "path to kernel source"), OPT_BOOLEAN('\0', "no-inlines", &probe_conf.no_inlines, "Don't search inlined functions"), -#endif OPT__DRY_RUN(&probe_event_dry_run), OPT_INTEGER('\0', "max-probes", &probe_conf.max_probes, "Set how many probe points can be found for a probe."), @@ -521,6 +522,16 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) #ifdef HAVE_DWARF_SUPPORT set_option_flag(options, 'L', "line", PARSE_OPT_EXCLUSIVE); set_option_flag(options, 'V', "vars", PARSE_OPT_EXCLUSIVE); +#else +# define set_nobuild(s, l, c) set_option_nobuild(options, s, l, "NO_DWARF=1", c) + set_nobuild('L', "line", false); + set_nobuild('V', "vars", false); + set_nobuild('\0', "externs", false); + set_nobuild('\0', "range", false); + set_nobuild('k', "vmlinux", true); + set_nobuild('s', "source", true); + set_nobuild('\0', "no-inlines", true); +# undef set_nobuild #endif set_option_flag(options, 'F', "funcs", PARSE_OPT_EXCLUSIVE); -- cgit v1.2.3-54-g00ecf