Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp605395rwl; Wed, 29 Mar 2023 06:20:14 -0700 (PDT) X-Google-Smtp-Source: AKy350a7PMwp8JcoJAE5S6y/yYyc/6WlVtf6BeAR7OlchilUGiSTgbAS+UtqqKuzh1rXQnKlmw1O X-Received: by 2002:a17:906:6b8b:b0:93f:9b68:a0f4 with SMTP id l11-20020a1709066b8b00b0093f9b68a0f4mr2425331ejr.26.1680096014311; Wed, 29 Mar 2023 06:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680096014; cv=none; d=google.com; s=arc-20160816; b=wfHx30cth5uRpBcfbCVap6Vgh/IEIN0qgTKCudRvSfhSEyTOEDQOANG7+uqdvdVObR MA5TayrF3UyDKRtN94NNx76Kh9DSUcuu5eEedIV3reeRZuuH5zdSmla6ofyUybPsH3GA MWRrdmWGyo7JOAu6vVYwdX0Auj5Z7rI5bGyYLVDb+nQmX2DlCOYGHeyRavgzdz5LKVmc Orf7eybEWVMd0J8NFavBaL352sIB/Hg5ptvhasVambXTgDJWkQKFjz8Cfzx7yPbOu4OJ 5pDc1kCr8sHS2tSllvROlrl8qF5ptdsbeYHqtPbs9P68h1aRZk+sntHUFSRuHwjCnHc+ ttEQ== 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=9z6gn3zCblRz+rcWfSgu/gi+ogdfB6zw++xCPo1zi2w=; b=yEoCY3P9Q1DQRMpmQPORPtJ4jkYmyEnyXJzihng+BSvHpFHYZC4phihe/gPSw0CiQK jqdgOwLK6cK1OgFbVgzsfL2pj5lmxmRIwaT8EURj4RdUFYRS+yjXaVmGXSUZJzCSr6kb 00mSuOgfwMRt3PzchLEayBYQVxXw8yj5j1pYVRA2tF+bxGvUBNu0Az49KEfJUSdF0uqG n62rzcZqZZ0ZWuwNagX9M2ThEVuhzW5RaAQmkFEMyItqYlFEDqbyzn1U5qANpz5Y/902 iMxlAL92MNqZJRpCkeXERWpQ3bjy8dhWqqF33+UHWObPr4QZc/fkyhOTZ2hoybrzmEUN pC8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QztLpmc+; 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 nc19-20020a1709071c1300b009333c443737si34200679ejc.105.2023.03.29.06.19.46; Wed, 29 Mar 2023 06:20:14 -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=QztLpmc+; 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 S230271AbjC2NSf (ORCPT + 99 others); Wed, 29 Mar 2023 09:18:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbjC2NSY (ORCPT ); Wed, 29 Mar 2023 09:18:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A97E5588; Wed, 29 Mar 2023 06:18:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2D8C061D11; Wed, 29 Mar 2023 13:18:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FF1DC43321; Wed, 29 Mar 2023 13:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680095893; bh=0kws+d9Nmkb4SZo6HGrrZaRdbgyyJEYMqGYIL1EJG+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QztLpmc+Q5DKUUvHOYSENPRc98tzx/hhOu6lJ1d6I9qpVZT26qGVSp49GnAAiz+sg 55GtTS6RhMyFouLI2CJbzzZcWwnSPo3rRjRTF+fR3qcTWXVzOnfa8k3/NR7A+/gvjM Z0Y9bXrpiOxg66k3dy1IwHG+WDeVRlEKalykiVJivfEYi8nRbQ1uoM8XEMEMcRc26y ujaaZC6OWc3EliSgIbaDTKoV0ugw8TYmVcZHsSghKSZEQtCumQmvp8ZTBPfgO/0br1 kyQ4VoWf3UNUOTaqrdrQXrfcVkvC1TJ9m7RQ+V5JwR+oD4wmr5hHYRd0jhxZlv/M4z /Q84b0E+Wzrkw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D678B4052D; Wed, 29 Mar 2023 10:18:10 -0300 (-03) Date: Wed, 29 Mar 2023 10:18:10 -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: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 Wed, Mar 29, 2023 at 10:09:48AM -0300, Arnaldo Carvalho de Melo escreveu: > 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]$ We can discuss this later, applied the series with just that zfree() change to annotation_options__exit(). - Arnaldo