projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d056513
)
perf trace: Fix an exit code of trace__symbols_init
author
Andrei Vagin
<
[email protected]
>
Wed, 8 Nov 2017 00:22:46 +0000
(16:22 -0800)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Thu, 16 Nov 2017 17:49:52 +0000
(14:49 -0300)
Currently if trace_event__register_resolver() fails, we return -errno,
but we can't be sure that errno isn't zero in this case.
Signed-off-by: Andrei Vagin <
[email protected]
>
Reviewed-by: Jiri Olsa <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Vasily Averin <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/builtin-trace.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-trace.c
b/tools/perf/builtin-trace.c
index f2757d38c7d7054d4dcef7d7e90f25efc115a8f7..84debdbad32717ce3f5a00cf646d778527cc6302 100644
(file)
--- a/
tools/perf/builtin-trace.c
+++ b/
tools/perf/builtin-trace.c
@@
-1152,12
+1152,14
@@
static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
if (trace->host == NULL)
return -ENOMEM;
- if (trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr) < 0)
- return -errno;
+ err = trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr);
+ if (err < 0)
+ goto out;
err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
evlist->threads, trace__tool_process, false,
trace->opts.proc_map_timeout, 1);
+out:
if (err)
symbol__exit();