From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Olsa Subject: Re: [PATCH 04/15] perf tools: Add map_groups to 'struct addr_location' Date: Fri, 29 Nov 2019 19:03:54 +0100 Message-ID: <20191129180354.GB26903@krava> References: <20191112183757.28660-1-acme@kernel.org> <20191112183757.28660-5-acme@kernel.org> <20191129134056.GE14169@krava> <20191129151733.GC26963@kernel.org> <20191129160631.GD26963@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20191129160631.GD26963@kernel.org> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Thomas Gleixner , Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , Andi Kleen List-Id: linux-perf-users.vger.kernel.org On Fri, Nov 29, 2019 at 01:06:31PM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Nov 29, 2019 at 12:17:33PM -0300, Arnaldo Carvalho de Melo escrev= eu: > > Em Fri, Nov 29, 2019 at 02:40:56PM +0100, Jiri Olsa escreveu: > > > > +++ b/tools/perf/util/callchain.c > > > > @@ -1119,8 +1119,8 @@ int fill_callchain_info(struct addr_location = *al, struct callchain_cursor_node * > > > > =09=09=09goto out; > > > > =09} > > > > =20 > > > > -=09if (al->map->groups =3D=3D &al->machine->kmaps) { > > > > -=09=09if (machine__is_host(al->machine)) { > > > > +=09if (al->mg =3D=3D &al->mg->machine->kmaps) { >=20 > > > heya, I'm getting segfault because of this change >=20 > > > perf record --call-graph dwarf ./ex >=20 > > > =09(gdb) r report --stdio > > > =09Program received signal SIGSEGV, Segmentation fault. > > > =09fill_callchain_info (al=3D0x7fffffffa1b0, node=3D0xcd2bd0, hide_un= resolved=3Dfalse) at util/callchain.c:1122 > > > =091122 if (al->maps =3D=3D &al->maps->machine->kmaps) { > > > =09(gdb) p al->maps > > > =09$1 =3D (struct maps *) 0x0 >=20 > > > I wish all those map changes would go through some review, > > > I have no idea how the code works now ;-) >=20 > > ouch, I did tons of tests, obviously some more, and reviewing, would > > catch these, my bad, will try and fix this... >=20 > > And yeah, I reproduced the problem, working on a fix. >=20 > Can you try with this one-liner? yep, it fixes the issue for me thanks, jirka >=20 > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > index 416d174d223c..c8c5410315e8 100644 > --- a/tools/perf/util/machine.c > +++ b/tools/perf/util/machine.c > @@ -2446,6 +2446,7 @@ static int append_inlines(struct callchain_cursor *= cursor, struct map_symbol *ms > =20 > =09list_for_each_entry(ilist, &inline_node->val, list) { > =09=09struct map_symbol ilist_ms =3D { > +=09=09=09.maps =3D ms->maps, > =09=09=09.map =3D map, > =09=09=09.sym =3D ilist->symbol, > =09=09}; >=20