Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2947023rwb; Mon, 7 Aug 2023 06:08:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeGnLn/GjXCj9yCy61KqEsL24UX8KBpT2N1z2ecmfY/Z92fXiQb0Mh1Sg27WUoYYOLbAt/ X-Received: by 2002:a05:6e02:1310:b0:348:8566:be66 with SMTP id g16-20020a056e02131000b003488566be66mr8408449ilr.18.1691413736505; Mon, 07 Aug 2023 06:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691413736; cv=none; d=google.com; s=arc-20160816; b=awZenoJaGUdXpRgB0ztnHx5t6w9+vziaGnxmhfpII0aqpO6x5Q+K97GVSe5vAE944W 5jnkPet5enAhtCADq757tU/0or26pe5AtLic62DIVmbe/tTbllMfyL7brjCjmXr6dm1e hIDotzLBHP4nXg1l/Mns647i1VNPwoTlFeNU4U/oWXxgxk7zopOZa4pJvRh+Y/URfEIr xvtANjSEfd9shp3pMTcozTqiKoNH9KCrCixba0/vPy1CgqdRJRd1GUzhtn2uZbgsiGUw as5XIIiG73R+F5WfinvJWdllT95k3XLPvflDLHTZ1s/GNJDEgm+H1/c50lg7AHCTPAxP 8S/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R+iPVr47N7bKYNd0s7qLkiMufN9f9ERRqZmsaHbfMOk=; fh=G29I++nWTSRjRRX2OeRHr0o2eFgezRGD0cNI1cSW8nI=; b=g7qwXzKw0tN3XyPno2ZnUWl3h07aTtMR0X7aO3KP0Dl5MURGMXnk1ovYQhf7jbvq4X Jud6wFpChJQqM1HFzD5Yg91hoY1xa9YjhM2wq4cIP2GwF11I4HMiXlpLpeo2gPmKUpoT ImtvG3IdebFXLhZAggcEI1kzPwl8S/O4KwgCl4KWskFSApctCGVeuMhkzVI/9A/7Z8/R wcpmD8c0MU5lbcOqaKttRcy1qs3uqxnkScK2uLfhcF9thX8geUpJGfGedOf8po4/gw4N qlgLmMlRPzeuap79CxNNoTf0M37hIR21yezH4cHrmb/pON1n7Iv9kPZ/7AanaxJxR5oe 0glA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gWEC+WWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x23-20020a63f717000000b005637962e15esi5544565pgh.603.2023.08.07.06.08.44; Mon, 07 Aug 2023 06:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gWEC+WWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbjHGLBK (ORCPT + 99 others); Mon, 7 Aug 2023 07:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjHGLBJ (ORCPT ); Mon, 7 Aug 2023 07:01:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28F1E10FA for ; Mon, 7 Aug 2023 04:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691406017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R+iPVr47N7bKYNd0s7qLkiMufN9f9ERRqZmsaHbfMOk=; b=gWEC+WWVDYGB7P77M6FTBhdftRElH+azpAs/0YqKdXjTnjiSZqoXWTuzEfXm8DGVYs/q5F dJKxudrdeItwmHlrfYE6MAEQtRQ8Kh2DfiG6BLwWahGmFOTzw5lm3cnGuW1DB+5fbs1f70 fLnpFgjNiOch4oV7aQDwlzZvbvvxK9o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-7IvRzP0UPe6JUkFbBOdltQ-1; Mon, 07 Aug 2023 07:00:15 -0400 X-MC-Unique: 7IvRzP0UPe6JUkFbBOdltQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F34E85CCE0; Mon, 7 Aug 2023 11:00:14 +0000 (UTC) Received: from alecto.usersys.redhat.com (unknown [10.45.225.231]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B4CB403168; Mon, 7 Aug 2023 11:00:11 +0000 (UTC) Date: Mon, 7 Aug 2023 13:00:08 +0200 From: Artem Savkov To: Arnaldo Carvalho de Melo Cc: Andrii Nakryiko , Namhyung Kim , Adrian Hunter , Alexander Shishkin , Ian Rogers , Ingo Molnar , Jiri Olsa , Mark Rutland , Masami Hiramatsu , Milian Wolff , Peter Zijlstra , Linux Kernel Mailing List Subject: Re: [PATCH 1/1] Revert "perf report: Append inlines to non-DWARF callchains" Message-ID: <20230807110008.GA886657@alecto.usersys.redhat.com> References: <20230802074335.GA622710@alecto.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230802074335.GA622710@alecto.usersys.redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 02, 2023 at 09:43:40AM +0200, Artem Savkov wrote: > Hi Arnaldo, > > On Tue, Aug 01, 2023 at 06:42:47PM -0300, Arnaldo Carvalho de Melo wrote: > > Hi Artem, > > > > Can you please double check this? I reproduced with: > > > > git checkout 46d21ec067490ab9cdcc89b9de5aae28786a8b8e > > build it > > perf record -a -g sleep 5s > > perf report > > > > Do you get the same slowness and then reverting it, i.e. just > > going to HEAD~ and rebuilding getting a fast 'perf report' startup, i.e. > > without the inlines in the callchains? > > With a simple test like this I definitely get a slowdown, but not sure > if it can be called excessive. > > Below are the times I got by running 'time perf report' and hitting 'q' > during load so that it quits as soon as it is loads up. Tested on a > freshly updated fedora 38. My bad, I had wrong debuginfo installed for the kernel I tested. I can reproduce it with the correct one. Looks like vmlinux is just too much for addr2line. Maybe we can skip it but leave other inlines in, like so: diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 11de3ca8d4fa7..fef309cd401f7 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -2388,7 +2388,9 @@ static int add_callchain_ip(struct thread *thread, ms.map = map__get(al.map); ms.sym = al.sym; - if (!branch && append_inlines(cursor, &ms, ip) == 0) + if (!branch && ms.map && ms.map->dso && + strcmp(ms.map->dso->short_name, "[kernel.vmlinux]") && + append_inlines(cursor, &ms, ip) == 0) goto out; srcline = callchain_srcline(&ms, al.addr); > > - Arnaldo > > > > ---- > > > > This reverts commit 46d21ec067490ab9cdcc89b9de5aae28786a8b8e. > > > > The tests were made with a specific workload, further tests on a > > recently updated fedora 38 system with a system wide perf.data file > > shows 'perf report' taking excessive time, so lets revert this until a > > full investigation and improvement on the addr2line support code is > > made. > > > > Cc: Andrii Nakryiko > > Cc: Artem Savkov > > Cc: Namhyung Kim > > Cc: Adrian Hunter > > Cc: Alexander Shishkin > > Cc: Ian Rogers > > Cc: Ingo Molnar > > Cc: Jiri Olsa > > Cc: Mark Rutland > > Cc: Masami Hiramatsu > > Cc: Milian Wolff > > Cc: Peter Zijlstra > > Signed-off-by: Arnaldo Carvalho de Melo > > --- > > tools/perf/util/machine.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > > index 4e62843d51b7dbf9..f4cb41ee23cdbcfc 100644 > > --- a/tools/perf/util/machine.c > > +++ b/tools/perf/util/machine.c > > @@ -45,7 +45,6 @@ > > > > static void __machine__remove_thread(struct machine *machine, struct thread_rb_node *nd, > > struct thread *th, bool lock); > > -static int append_inlines(struct callchain_cursor *cursor, struct map_symbol *ms, u64 ip); > > > > static struct dso *machine__kernel_dso(struct machine *machine) > > { > > @@ -2385,10 +2384,6 @@ static int add_callchain_ip(struct thread *thread, > > ms.maps = maps__get(al.maps); > > ms.map = map__get(al.map); > > ms.sym = al.sym; > > - > > - if (!branch && append_inlines(cursor, &ms, ip) == 0) > > - goto out; > > - > > srcline = callchain_srcline(&ms, al.addr); > > err = callchain_cursor_append(cursor, ip, &ms, > > branch, flags, nr_loop_iter, > > -- > > 2.41.0 > > > > -- > Artem -- Artem