From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CB54C43331 for ; Sun, 29 Mar 2020 00:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFB47206F2 for ; Sun, 29 Mar 2020 00:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbgC2AnX (ORCPT ); Sat, 28 Mar 2020 20:43:23 -0400 Received: from mail.ut.ac.ir ([80.66.177.10]:60304 "EHLO mail.ut.ac.ir" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgC2AnX (ORCPT ); Sat, 28 Mar 2020 20:43:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ut.ac.ir (Postfix) with ESMTP id 9D6071DA604; Sun, 29 Mar 2020 05:13:19 +0430 (+0430) Received: from mail.ut.ac.ir ([127.0.0.1]) by localhost (mail.ut.ac.ir [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i8k6cfTNDyW7; Sun, 29 Mar 2020 05:13:19 +0430 (+0430) Received: from mail.ut.ac.ir (mail.ut.ac.ir [194.225.0.10]) by mail.ut.ac.ir (Postfix) with ESMTP id 6B3041DA5F9; Sun, 29 Mar 2020 05:13:18 +0430 (+0430) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 29 Mar 2020 05:13:18 +0430 From: ahmadkhorrami To: Jiri Olsa Cc: Steven Rostedt , Arnaldo Carvalho de Melo , Linux-trace Users , Peter Zijlstra , linux-trace-users-owner@vger.kernel.org, Jin Yao , Milian Wolff , Namhyung Kim , Changbin Du , Andi Kleen Subject: Re: Wrong Perf Backtraces In-Reply-To: <20200328233431.GB2155755@krava> References: <20200326095928.GF1947699@krava> <243486883401862967ec2b06348c67f3@ut.ac.ir> <20200326153950.GG1947699@krava> <20200327092045.GH1947699@krava> <821540886fc57d7749edee585a50602f@ut.ac.ir> <20200327223743.GA2155755@krava> <57b9e24200019a41bd465e2d78c09e29@ut.ac.ir> <20200328233431.GB2155755@krava> Message-ID: X-Sender: ahmadkhorrami@ut.ac.ir User-Agent: Roundcube Webmail/1.3.6 Sender: linux-trace-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-users@vger.kernel.org Hi Mr. Olsa, Thanks for your time. The problem is still there. Repeated lines are not limited to inline functions. If my script works on your system, it will show these lines. Regards. On 2020-03-29 04:04, Jiri Olsa wrote: > On Sat, Mar 28, 2020 at 03:42:53AM +0430, ahmadkhorrami wrote: > >> Hi, >> Thanks. If you suggest the potentially bogus locations of the source >> code, I >> will give a try. >> Regards. > > heya, > the change below 'fixes' it for me: > > $ perf script ... > ... > evince 2220122 1605573.007639: 11759 cycles:u: > ffffffffaec012f0 [unknown] ([unknown]) > 7f93f17116b6 __mmap64+0x26 mmap64.c:59 (inlined) > 7f93f17116b6 __mmap64+0x26 mmap64.c:47 (inlined) > > it wasn't really broken, the output is just missing the source line > info in perf script callchain output, which adds the "missing part", > because for inlined entries the entry address stays the same for all > its inlined parts > > could you try the change? > > thanks, > jirka > > diff --git a/tools/perf/util/evsel_fprintf.c > b/tools/perf/util/evsel_fprintf.c > index 3b4842840db0..7349dfbbef2e 100644 > --- a/tools/perf/util/evsel_fprintf.c > +++ b/tools/perf/util/evsel_fprintf.c > @@ -174,8 +174,11 @@ int sample__fprintf_callchain(struct perf_sample > *sample, int left_alignment, > if (print_srcline) > printed += map__fprintf_srcline(map, addr, "\n ", fp); > > - if (sym && sym->inlined) > + if (sym && sym->inlined) { > + if (node->srcline) > + printed += fprintf(fp, " %s", node->srcline); > printed += fprintf(fp, " (inlined)"); > + } > > if (!print_oneline) > printed += fprintf(fp, "\n");