diff options
author | 2018-03-18 13:50:53 -0400 | |
---|---|---|
committer | 2018-03-20 13:16:09 -0300 | |
commit | 555fc3b1ef4c850c635be333024dcf67bc1e7cb8 (patch) | |
tree | 14ec58ecc34e44f6ea14d88e9e8989d74718cff5 /tools/perf/util/unwind-libdw.c | |
parent | Merge tag 'perf-core-for-mingo-4.17-20180319' of git://git.kernel.org/pub/scm... (diff) | |
download | linux-555fc3b1ef4c850c635be333024dcf67bc1e7cb8.tar.gz linux-555fc3b1ef4c850c635be333024dcf67bc1e7cb8.tar.bz2 linux-555fc3b1ef4c850c635be333024dcf67bc1e7cb8.zip |
perf unwind: Report error from dwfl_attach_state
In verbose level 2, errors returned by libdw are reported in most cases,
but not when calling dwfl_attach_state.
Since elfutils v 0.160 (2014), dwfl_attach_state sets the error code to
report failure cause. On failure, log the reported error.
Signed-off-by: Martin Vuille <jpmv27@aim.com>
Reviewed-by: Kim Phillips <kim.phillips@arm.com>
Link: http://lkml.kernel.org/r/20180318175053.4222-1-jpmv27@aim.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/unwind-libdw.c')
-rw-r--r-- | tools/perf/util/unwind-libdw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c index 8e969f28cc59..7bdd239c795c 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -236,7 +236,8 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg, if (err) goto out; - if (!dwfl_attach_state(ui->dwfl, EM_NONE, thread->tid, &callbacks, ui)) + err = !dwfl_attach_state(ui->dwfl, EM_NONE, thread->tid, &callbacks, ui); + if (err) goto out; err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui); |