Re: [GIT PULL 00/11] perf/core improvements and fixes

From: Arnaldo Carvalho de Melo
Date: Fri May 20 2016 - 11:05:22 EST


Em Thu, May 19, 2016 at 07:21:22PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
>
> Please consider pulling, this is on top of my previous pull
> request (perf-core-for-mingo-20160516).

So, here is a new pull req, removing the following patch, due to that
segfault you noticed while testing 'perf top' on an ubuntu system:

> He Kuang (2):
> perf tools: Find vdso supporting cross-platform analysis

The new tag is perf-core-for-mingo-20160520.

Kuang, Ingo proposed the patch below to fix the problem he noticed
(notice the 'dso && ' part, as __dsos__find() may return NULL), but he
had several other issues with code touched by this patch, I'll try to
address those, please check the patch below and resubmit.

- Arnaldo

tools/perf/util/vdso.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 8f81c415723d..3a9321f83d00 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -293,12 +293,12 @@ static struct dso *machine__find_vdso(struct machine *machine,
switch (dso_type) {
case DSO__TYPE_32BIT:
dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO32, true);
- if (!dso) {
- dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO,
- true);
- if (dso_type != dso__type(dso, machine))
- dso = NULL;
- }
+ if (dso)
+ break;
+
+ dso = __dsos__find(&machine->dsos, DSO__NAME_VDSO, true);
+ if (dso && dso_type != dso__type(dso, machine))
+ dso = NULL;
break;
case DSO__TYPE_X32BIT:
dso = __dsos__find(&machine->dsos, DSO__NAME_VDSOX32, true);