Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5123673rwl; Tue, 28 Mar 2023 16:57:18 -0700 (PDT) X-Google-Smtp-Source: AKy350Zw9NPczU1aimVVCsmBWPH+xfFIBQYEwMHXNxHXrTvJmjdrfjXgIfMls0/mzj7P9P2BJXPK X-Received: by 2002:aa7:c906:0:b0:4fd:2aac:d480 with SMTP id b6-20020aa7c906000000b004fd2aacd480mr20100748edt.21.1680047838631; Tue, 28 Mar 2023 16:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680047838; cv=none; d=google.com; s=arc-20160816; b=T4eqZdEXWHmJfj6yLOs2lPFwnew+rDI1jmek9VwX3eyVOUj859Yz/lz3lz/hjrwcqN UnVptrzJZ7gus9hFAztWXoMDQdBZwveuJRqgcK+a3v3j3DEUy1fRqS1ltVnEbMjuEqr2 HHwD1YCD7YmUMe57to+6Mp7yBBuqSrCSjlWg82oiBkHg9Ej2Pg5OfjVBcJCLWLmJUlzB RL9+f7Jrs4jXUk92FE1XVH58zK8KzS8BlS0KKyi07XLIOBedtgcLxZsHGfQGVvLswLm9 XKwCLtk2DMUm3a2sWh1cl2gAJ7FknoHgw1O+B8ewEmvLlGLVtABgjoPeP/0tTu79CzC3 vbPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=QwhWDPXvx6cfkb5reLksh9jCAury04O7LzcSvRbB8Zs=; b=qEvql13IL44wJ67zy9RMILEzJCDVOYG05uzrK7hzi5i0KYvCQTwKpuzJKZgxxEWQN5 HYhRPrzdSsZBjWWfZWKJd/ENwPxKK+nPQGESz1EJWgU0HGYmBH6GbBhjq/ulXGqFCWa/ jRsUDPvEq1KBpKLomckluv9yMQW+f8dOLfGNctJiKDikb/VHiwjPxuxSNLVIHe6EZFMD eGJ9p78zkGAhgWqlpRqcYOHaFfz+P3zfB9DtUwBlB8Pm43SNfYOocdrkGkopeoLVwUvk 6ptTLq/NXEj+oPNQHEPGZvu92jfqpGoKgxi3hsZV1uJtqm8a3HmZWMAlrzudLwP+PztT 2sxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ltgu8Ff4; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo2-20020a0564020b2200b004c095188c84si28309371edb.176.2023.03.28.16.56.54; Tue, 28 Mar 2023 16:57:18 -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=@google.com header.s=20210112 header.b=Ltgu8Ff4; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjC1X4b (ORCPT + 99 others); Tue, 28 Mar 2023 19:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbjC1X42 (ORCPT ); Tue, 28 Mar 2023 19:56:28 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A15B30D8 for ; Tue, 28 Mar 2023 16:56:11 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id j11-20020a25230b000000b00b6871c296bdso13510406ybj.5 for ; Tue, 28 Mar 2023 16:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680047769; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=QwhWDPXvx6cfkb5reLksh9jCAury04O7LzcSvRbB8Zs=; b=Ltgu8Ff4auNliuT5UliaEkAuq9i2Tzu+5U2BQzip1AZokzyNRdwHBLrr0A1q1TCteh 6HA8rQWn2amyDpZCOcWkijg0aV3wa7oBLO7ki4rM6Xzr9cqFtUVrftkblee0rzPjMb+L wJ4eW8t3SAEsbCXRcXZGpnQH05BULFCsjjs0PkcoeeHAo5P4f+L0tmwiyGtOxdqtUqwk lRhAg5051knYmNhbu0rixPc04ElVILRM6fmL1sequabHkJhfYFow2m9eE4OC/NNGI7D5 M1zB/Iu+BE5dCWofkvweIXTenU0zYzPftguEROrDBdX8QE4rvu1TaHyUsk4TFKeXBN50 OHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680047769; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QwhWDPXvx6cfkb5reLksh9jCAury04O7LzcSvRbB8Zs=; b=amebcJLe8EpVD0kjwtN8NU00psWmBuJSztsC9kRDMFK3hyrtydifbsU9HcaXMmCDkS eg2U6vP+CDDgwLYSTShKmRohxz0TZLq0f0YvX8562/p8eEDt6M6ELBE475+3M+/eldUY bv34ebymglSAGVooVejEFaWXxalbBD9NQykn5v86pXl167/5s/Hwwuo+kh4JgjMDlWHj KzQ7iPRZDcrDADRpOgJ5r+IvC9qGif9H2D7dbZonG8MawvNCsh6AGfjKwtUA9KH+g4+z 9mJvZZDuVPVNCcQdGUs0XwyeiPkJKP/Ff38LX6DaCyfeWnyZwm+DjwOy1wCE6khcYjlK mTvw== X-Gm-Message-State: AAQBX9ebCnOQrYCdnx5+AXY+PgileqyUaxJCYNnhu5TeG1SLL2iEPbgs w54hm0mgdA5gAYqN9/ggfIb5PgHe//i0 X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:6519:f0d3:9540:5c31]) (user=irogers job=sendgmr) by 2002:a05:6902:1003:b0:b1d:5061:98e3 with SMTP id w3-20020a056902100300b00b1d506198e3mr11705976ybt.6.1680047769358; Tue, 28 Mar 2023 16:56:09 -0700 (PDT) Date: Tue, 28 Mar 2023 16:55:38 -0700 In-Reply-To: <20230328235543.1082207-1-irogers@google.com> Message-Id: <20230328235543.1082207-2-irogers@google.com> Mime-Version: 1.0 References: <20230328235543.1082207-1-irogers@google.com> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog Subject: [PATCH v1 1/6] perf annotate: Delete session for debug builds From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 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 + return ret; } -- 2.40.0.348.gf938b09366-goog