Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640421
| Path | csiph.com!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Namhyung Kim <namhyung@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode |
| Date | Fri, 12 May 2017 14:20:01 +0200 |
| Message-ID | <tGhI5-4nv-7@gated-at.bofh.it> (permalink) |
| References | <tFkoF-6Y6-17@gated-at.bofh.it> <tFsYW-5x7-5@gated-at.bofh.it> <tGfZD-321-5@gated-at.bofh.it> |
| X-Original-To | Milian Wolff <milian.wolff@kdab.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6+dmD5cMLTZ5fxddvGtKBApqV4YAhMVouvX3F7Jud8k=; b=CZ3DyGcEhRmE15V0SXtGiUEXqip++cnTCNGe95Wt51NhU8Uz1VfvdFZjUEg3Y3ORWs Nw0OTuwbakt/ALYU+xJ7En8HT26z9rU+ZDmhQtyJ8MEXn+l9Er+8eYpPsQbxWvJyxTmO Q7d/62lxajtbDryBigjdP7QWaW1LpE0dquOqkwdXspN1iIHRCZ8FzhxE1K1DrTRLRkHO RF1LK0zVgt3SZ7k++jaa81D6W84HB8H+cEKBFmmnWj7Zvx8sjLNB7h8CPtBCkNgPoTlP s2j/iIqt8cv0urOOM8JOTPte9xZAOVh26zfVnf80g25L+592bvJabIkojmcIhmAKMkjc /nug== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=6+dmD5cMLTZ5fxddvGtKBApqV4YAhMVouvX3F7Jud8k=; b=b6IpOcBcgqJpd5uim/qYrg+X8YEpwN33Hm3Gm1XKjKmdNAaUXJu0GTIZVLtvUONNlJ 2pu0fIC1i9sr7lYSmy12mEtTxH7O7CWcOuQULeST5vJhxvhyx6IveCwHOv5BZvLnrPHM 2H6p1UhjpvyVvgPOhhogmUUsxQrG12zdmrf5/b1w62qYQpII3peFUDb0BqPUtDg8NZ/H VUFL34O7DjMW88ggJvvDK6bAz3m0qXHN2mIDsi9SeXIFPW+YF70u6HMlFkypzSpmV4Hb n6ofimI9UMiwZCqKxngzAE6U+K/NJaEgYPpe3lhOWqKRcxwnSSV4hLzjqPdBsl8LKR5/ tIbw== |
| X-Gm-Message-State | AODbwcBWC13rAf23YGvxdlLqu6c6QObU2mR6wOJ1RbdbdVUE6oXqDWGW zlIsU50aT9Danw== |
| X-Received | by 10.99.53.12 with SMTP id c12mr4147681pga.165.1494591555126; Fri, 12 May 2017 05:19:15 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| User-Agent | Mutt/1.8.2 (2017-04-18) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 43 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo <acme@redhat.com>, David Ahern <dsahern@gmail.com>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Yao Jin <yao.jin@linux.intel.com>, kernel-team@lge.com |
| X-Original-Date | Fri, 12 May 2017 21:19:03 +0900 |
| X-Original-Message-ID | <20170512121903.GA3839@danjae.aot.lge.com> |
| X-Original-References | <20170509205046.21473-1-milian.wolff@kdab.com> <20170510060423.GB2667@sejong> <1866798.U7tsNezOxe@agathebauer> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1640421 |
Show key headers only | View raw
On Fri, May 12, 2017 at 12:23:06PM +0200, Milian Wolff wrote:
> On Mittwoch, 10. Mai 2017 08:04:23 CEST Namhyung Kim wrote:
> > On Tue, May 09, 2017 at 10:50:46PM +0200, Milian Wolff wrote:
>
> <snip>
>
> > > diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
> > > index 9ab68682c6d0..295f0846fd84 100644
> > > --- a/tools/perf/util/callchain.c
> > > +++ b/tools/perf/util/callchain.c
> > > @@ -642,13 +642,22 @@ static enum match_result match_chain_strings(const
> > > char *left,>
> > > static enum match_result match_chain_srcline(struct callchain_cursor_node
> > > *node,>
> > > struct callchain_list *cnode)
> > >
> > > {
> > >
> > > - char *left = get_srcline(cnode->ms.map->dso,
> > > - map__rip_2objdump(cnode->ms.map, cnode->ip),
> > > - cnode->ms.sym, true, false);
> > > - char *right = get_srcline(node->map->dso,
> > > - map__rip_2objdump(node->map, node->ip),
> > > - node->sym, true, false);
> > > - enum match_result ret = match_chain_strings(left, right);
> > > + char *left = NULL;
> > > + char *right = NULL;
> > > + enum match_result ret = MATCH_ERROR;
> > > +
> > > + if (!node->map || !cnode->ms.map)
> > > + return ret;
> >
> > This makes it fall back to function/address matching below if one of
> > srcline is not available. But it'll just show many "??:0" entries
> > IMHO. Maybe we can use same logic in util/sort.c:cmp_null instead..
>
> Yes, that could be done but I think it's not directly related to the patch/fix
> at hand. Would it be OK if I change this behavior in a separate patch?
I'm OK with that.
Thanks,
Namhyung
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf report: don't crash on invalid maps in `-g srcline` mode Milian Wolff <milian.wolff@kdab.com> - 2017-05-09 23:00 +0200
Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode Namhyung Kim <namhyung@kernel.org> - 2017-05-10 08:10 +0200
Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode Milian Wolff <milian.wolff@kdab.com> - 2017-05-12 12:30 +0200
Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode Namhyung Kim <namhyung@kernel.org> - 2017-05-12 14:20 +0200
Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode Paul Clarke <pc@us.ibm.com> - 2017-05-11 15:20 +0200
csiph-web