From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550AbcAGUmN (ORCPT ); Thu, 7 Jan 2016 15:42:13 -0500 Received: from mail.kernel.org ([198.145.29.136]:52618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbcAGUmK (ORCPT ); Thu, 7 Jan 2016 15:42:10 -0500 Date: Thu, 7 Jan 2016 17:42:05 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Namhyung Kim , Jiri Olsa , lkml , David Ahern , Ingo Molnar , Peter Zijlstra , Noel Grandin , Adrian Hunter Subject: Re: [PATCHv3 06/13] perf record: Store data mmaps for dwarf unwind Message-ID: <20160107204205.GH18457@kernel.org> References: <1452158050-28061-1-git-send-email-jolsa@kernel.org> <1452158050-28061-7-git-send-email-jolsa@kernel.org> <20160107111239.GE5499@danjae.kornet> <20160107123928.GA22486@krava.brq.redhat.com> <20160107131414.GI5499@danjae.kornet> <20160107133022.GA32115@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160107133022.GA32115@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jan 07, 2016 at 02:30:22PM +0100, Jiri Olsa escreveu: > On Thu, Jan 07, 2016 at 10:14:14PM +0900, Namhyung Kim wrote: > > On Thu, Jan 07, 2016 at 01:39:28PM +0100, Jiri Olsa wrote: > > > Currently we don't synthesize data mmap by default. It depends > > > on -d option, that enables data address sampling. > > > > > > But we've seen cases (softice) where DWARF unwinder went through > > > non executable mmaps, which we need to lookup in MAP__VARIABLE tree. > > > > > > Making data mmaps to be synthesized for dwarf unwind as well. > > > > > > Reported-by: Noel Grandin > > > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org > > > Signed-off-by: Jiri Olsa > > > --- > > > tools/perf/builtin-record.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > > > index 9c5cdc2c4471..465bde77f49b 100644 > > > --- a/tools/perf/builtin-record.c > > > +++ b/tools/perf/builtin-record.c > > > @@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt, > > > } > > > > > > ret = parse_callchain_record_opt(arg, &callchain_param); > > > - if (!ret) > > > + if (!ret) { > > > + /* Enable data address sampling for DWARF unwind. */ > > > + record->sample_address = true; > > > > How does it guarantee that it enables data address sampling only for > > DWARF unwind? Maybe you want this? > > > > if (callchain_param.record_mode == CALLCHAIN_DWARF) > > record->sample_address = true; > > ugh.. too much coofee.. :-\ third time's a charm, v3 attached Noel, have you tested this latest patch? Does it fix things for you in this latest iteration? If so, can I stick a "Reported-and-Tested-by: Noel Grandin <>" to this? > thanks, > jirka > > > --- > Currently we don't synthesize data mmap by default. It depends > on -d option, that enables data address sampling. > > But we've seen cases (softice) where DWARF unwinder went through > non executable mmaps, which we need to lookup in MAP__VARIABLE tree. > > Making data mmaps to be synthesized for dwarf unwind as well. > > Reported-by: Noel Grandin > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/builtin-record.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c > index 9c5cdc2c4471..dc4e0adf5c5b 100644 > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -815,8 +815,12 @@ int record_parse_callchain_opt(const struct option *opt, > } > > ret = parse_callchain_record_opt(arg, &callchain_param); > - if (!ret) > + if (!ret) { > + /* Enable data address sampling for DWARF unwind. */ > + if (callchain_param.record_mode == CALLCHAIN_DWARF) > + record->sample_address = true; > callchain_debug(); > + } > > return ret; > } > -- > 2.4.3