Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp592424rwl; Wed, 29 Mar 2023 06:10:59 -0700 (PDT) X-Google-Smtp-Source: AKy350YDEk7tOoLEkEPXf6KFY2YvY8W83dqY2hjFS81WPrIpOoR5wd2x4n8nRUNmzrfISt5mnZxh X-Received: by 2002:a17:906:9512:b0:92f:1418:27f0 with SMTP id u18-20020a170906951200b0092f141827f0mr20578656ejx.34.1680095459099; Wed, 29 Mar 2023 06:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095459; cv=none; d=google.com; s=arc-20160816; b=ed0HEMOWqsWiWp/o9fTeC1NtQj8KEwWKfxRC0jLk2/9/xydO7K2br4DbB2jVc65qNG UcPTOsWCAYE7HzmdiT3hNG5/N18b9q2oOHfR42l2d6K4DqAvpNK2awMe0aCIQEaskVbx XkzmoPyZmvP7f15In5mHhsTRGdPD0Oa0AcRYjkHZoNkBmE9ATqBXb5NNRLYFEl14zoZ2 fSZmD5QihIf5hB7lfZ27cSzRYeDZl0Wg4JyHQnCif95HaF3pIs4rTv5JtiJMLqOn53ze fFpCD8/ATU6NxTPF6updcUTX9GpeMy6iH/89efSP7VU7VyDOYItVCXjb6FDSGclM+xQM jboA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cB1pVK5STByKB4YuSmYhnw8zJ2JtTnDYGhfogVf1SN8=; b=SnwhZQNCFKFDWL6IBAJ8khSMEV4PqEgOAbUlFGy6wEWGSoFbNaqXE+U4z1/oRzm0Va S5qMx81h0NPkT+awkfTpNTfFGN+GBAHSr7r9TrzyVdZ6PWAm7fkKRwnMkDqvL88xAtOw 6zhagBIOf7pNCJi8aYEWvQgrt8DU2BCUfAxzs7HlLWiCTIijPrwCFk5z48GVPb2iNdKf JlvROWx5WSRAbU2Ho9gqCqnG2DXdm82AtXKLPWNwl0lmQVDPX9wX2VWWoBJJR/at4I9B b/uYK6jydyaxEvZWYv1AHTmfJa5zJjpEOIEgliH2ok1SBj9sbPGrzlqXkjm03+csjXr6 qlIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nakaeaek; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 23-20020a170906101700b00922d833a2dbsi20018967ejm.508.2023.03.29.06.10.34; Wed, 29 Mar 2023 06:10:59 -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=@kernel.org header.s=k20201202 header.b=Nakaeaek; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbjC2NJz (ORCPT + 99 others); Wed, 29 Mar 2023 09:09:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjC2NJy (ORCPT ); Wed, 29 Mar 2023 09:09:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6609B3; Wed, 29 Mar 2023 06:09:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 74BA0B822F3; Wed, 29 Mar 2023 13:09:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 021EBC433D2; Wed, 29 Mar 2023 13:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680095391; bh=QA0CaowHS8lYn5wmOX7+pisJ5FR1qwMNwQVbvZ99QKY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nakaeaekun5nbXp/DAXQTdtPYyMLwJ9ttqJT4pdFR1SN3SkVx6lcIPdajgiyNXOil vf2V6x5/3GTZMX7GH7/zwxWY4nPLPR0t2sCvvnczLIe3qoncVEpqT7+fvUt2ybVcmR 5ffrzRP8x8yeYySGmcgFIm5fjwl25ziINsMs6tLSyiZSOrYyyXqTreD8XxV89qwFC6 jK4vzpmv1F3He16pDi7nQ/m3rw6mnqs7FEgswBjCb/R/xvryOorHeR1B3VX6LGteQt pGFOWPjAZXKuQBF3cmcp+ghCNIvpnV8y6WATm+FzJ/ogG8Df4cBGSE5Y7LtfyFaLf2 Qv1OJ6BQvlOzQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id ABB7D4052D; Wed, 29 Mar 2023 10:09:48 -0300 (-03) Date: Wed, 29 Mar 2023 10:09:48 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , James Clark , Andi Kleen , Kan Liang , German Gomez , Sandipan Das , Andres Freund , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v1 1/6] perf annotate: Delete session for debug builds Message-ID: References: <20230328235543.1082207-1-irogers@google.com> <20230328235543.1082207-2-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230328235543.1082207-2-irogers@google.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Em Tue, Mar 28, 2023 at 04:55:38PM -0700, Ian Rogers escreveu: > Use the debug build indicator as the guide to free the session. This > implements a behavior described in a comment, which is consequentially > removed. > > Signed-off-by: Ian Rogers > --- > tools/perf/builtin-annotate.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c > index 4750fac7bf93..98d1b6379230 100644 > --- a/tools/perf/builtin-annotate.c > +++ b/tools/perf/builtin-annotate.c > @@ -692,16 +692,12 @@ int cmd_annotate(int argc, const char **argv) > > out_delete: > /* > - * Speed up the exit process, for large files this can > - * take quite a while. > - * > - * XXX Enable this when using valgrind or if we ever > - * librarize this command. > - * > - * Also experiment with obstacks to see how much speed > - * up we'll get here. > - * > - * perf_session__delete(session); > + * Speed up the exit process by only deleting for debug builds. For > + * large files this can save time. > */ > +#ifndef NDEBUG > + perf_session__delete(annotate.session); > +#endif So now, but default, we will call this, as we don't have this defined only if DEBUG=1 is set, right? ⬢[acme@toolbox perf-tools-next]$ find tools/perf/ -type f | xargs grep NDEBUG tools/perf/util/mutex.c:#ifndef NDEBUG ⬢[acme@toolbox perf-tools-next]$ - Arnaldo