LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH RESEND] perf unwind: Report error from dwfl_attach_state
@ 2018-03-18 17:50 Martin Vuille
2018-03-20 0:06 ` Kim Phillips
2018-03-25 22:07 ` [tip:perf/core] " tip-bot for Martin Vuille
0 siblings, 2 replies; 4+ messages in thread
From: Martin Vuille @ 2018-03-18 17:50 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Martin Vuille, linux-perf-users, linux-kernel
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>
---
tools/perf/util/unwind-libdw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
--
2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] perf unwind: Report error from dwfl_attach_state
2018-03-18 17:50 [PATCH RESEND] perf unwind: Report error from dwfl_attach_state Martin Vuille
@ 2018-03-20 0:06 ` Kim Phillips
2018-03-20 16:18 ` Arnaldo Carvalho de Melo
2018-03-25 22:07 ` [tip:perf/core] " tip-bot for Martin Vuille
1 sibling, 1 reply; 4+ messages in thread
From: Kim Phillips @ 2018-03-20 0:06 UTC (permalink / raw)
To: Martin Vuille; +Cc: Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
On Sun, 18 Mar 2018 13:50:53 -0400
Martin Vuille <jpmv27@aim.com> wrote:
> 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>
Kim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] perf unwind: Report error from dwfl_attach_state
2018-03-20 0:06 ` Kim Phillips
@ 2018-03-20 16:18 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-20 16:18 UTC (permalink / raw)
To: Kim Phillips
Cc: Martin Vuille, Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
Em Tue, Mar 20, 2018 at 08:06:33AM +0800, Kim Phillips escreveu:
> On Sun, 18 Mar 2018 13:50:53 -0400
> Martin Vuille <jpmv27@aim.com> wrote:
>
> > 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>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf unwind: Report error from dwfl_attach_state
2018-03-18 17:50 [PATCH RESEND] perf unwind: Report error from dwfl_attach_state Martin Vuille
2018-03-20 0:06 ` Kim Phillips
@ 2018-03-25 22:07 ` tip-bot for Martin Vuille
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Martin Vuille @ 2018-03-25 22:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, jpmv27, linux-kernel, hpa, kim.phillips, tglx, acme
Commit-ID: 555fc3b1ef4c850c635be333024dcf67bc1e7cb8
Gitweb: https://git.kernel.org/tip/555fc3b1ef4c850c635be333024dcf67bc1e7cb8
Author: Martin Vuille <jpmv27@aim.com>
AuthorDate: Sun, 18 Mar 2018 13:50:53 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 20 Mar 2018 13:16:09 -0300
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>
---
tools/perf/util/unwind-libdw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-25 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 17:50 [PATCH RESEND] perf unwind: Report error from dwfl_attach_state Martin Vuille
2018-03-20 0:06 ` Kim Phillips
2018-03-20 16:18 ` Arnaldo Carvalho de Melo
2018-03-25 22:07 ` [tip:perf/core] " tip-bot for Martin Vuille
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).