perf trace: Only auto set call-graph to "dwarf" when syscalls are being traced
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 19 May 2016 22:00:27 +0000 (19:00 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 May 2016 14:43:57 +0000 (11:43 -0300)
When --min-stack or --max-stack is passwd but --no-syscalls is also in
effect, there is no point in automatically setting '--call-graph dwarf'.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-pq922i7h9wef0pho1dqpttvn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c

index 7401de71d0974f53e923a42d85514046bd702d75..487c10401d46be23b22c1522b974a4155ce4bceb 100644 (file)
@@ -2910,7 +2910,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused)
        }
 
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
-       if ((trace.min_stack || max_stack_user_set) && !callchain_param.enabled)
+       if ((trace.min_stack || max_stack_user_set) && !callchain_param.enabled && trace.trace_syscalls)
                record_opts__parse_callchain(&trace.opts, &callchain_param, "dwarf", false);
 #endif