Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1356892rwd; Thu, 8 Jun 2023 17:05:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5T98GnCa7Gik+pr9jqQhO51A7sF1rxrR/SaMjVQzBHC/VtQnKGW0+wQ1kv18qWGU/Dxztc X-Received: by 2002:a17:90b:3581:b0:259:a7a6:26f9 with SMTP id mm1-20020a17090b358100b00259a7a626f9mr4062795pjb.21.1686269106301; Thu, 08 Jun 2023 17:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686269106; cv=none; d=google.com; s=arc-20160816; b=aApzUN2CmfKh0S1t8d8g0DTFtWH7z0jEYzmLcO90kqSz+7dpOjwlQjW2XEqUxa+Rlu N1j0EbKT5vmNPDem8p2MEMQqANJ6GrLB0lWQVMAYgZalemfFa7A8HJw80YW67QahIpCY qv28OAdrmxQQvKt8OPkdvsYtTrUjh+FBYCbdSobPGO7hv/DC2IPYr+g96D3RMngD8O3g Yghp5LiDVGtt+IpaT9hGbOfeSrLqluQG3HvfjPEv7RZqf7nRDWAaAqPE4sQhuLEMvDwI T8XoHuKUTKWhdI9ZcaR2xPkPzGhYfS+V3K1zOopno9ZptJ/DFbmdG/vxvs0VMMTgCts6 pTGA== 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=aFeBvXSDSdHQDEP4y6c+chE/HON9+ZqSLzpectqZUCI=; b=Zp//vYG/iOQWGsnhJS0rKKUTEL7poBmRECGn0OJt1a+Zd6V3XcdkSG+y6qzHRXANod rqNrobEQZilhscY1ppjTGEVZhhsyTT4DJWAp1Nal7RtniYo1bqegJ/WmeGqhv2TuWH9u gCfrqiM6pRbHGGo92mX9Z9tPnEZQIVyQU1/4qOdsvlf5Lr3rJXUIx/yCPRe2lNB0PAle TUcMnGE4i5l45Pp2Gt6L7oxY8KQzeWWaeCOGMCIZjHFE6v3TvrGU/5PNHoDZfOTz0aOG bzgBJb+fAXQh+QFNa/ktOZ82ohso5yZR7/Vs3OJnW8JhJEzA+6v7onrV5KN2eTztDU2C 7VZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=CLN02UU5; 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 q7-20020a170902dac700b001a1ee8ceedcsi1841579plx.495.2023.06.08.17.04.51; Thu, 08 Jun 2023 17:05:06 -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=20221208 header.b=CLN02UU5; 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 S237527AbjFHXa3 (ORCPT + 99 others); Thu, 8 Jun 2023 19:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237398AbjFHX3s (ORCPT ); Thu, 8 Jun 2023 19:29:48 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA3233586 for ; Thu, 8 Jun 2023 16:29:39 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-569fee67d9dso24997827b3.1 for ; Thu, 08 Jun 2023 16:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686266979; x=1688858979; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=aFeBvXSDSdHQDEP4y6c+chE/HON9+ZqSLzpectqZUCI=; b=CLN02UU5+WWzs/zPaD+MM1F2zbmnBKDuiddMFb9fykdDg8v+BAKC13PIbVSZQ6g9ly oTUlgCMkciNJoajBVI0uGTHyF/vmH7VJ4+Sb5R4dLOQkddMLf1VuCqiFZwdxSuAItV4L DxWB+919dwyqi59uSrIKdxJN5rQTc15QIw+PQ6PuSrI7oqBp/YHq7dWYhAtlfld5BbNk sAHJvW+pf00vZhaCk85of58remxSTvBSBHGMPn4FXEcFieVNaE+1T8cIn9DiOzGn+jNb tUbPL+XZ2UiXIVrWL8Xyw+Lh+o3cdPXrehaQmYAr5NmvLNK9padtYiFhZACY7jOfLEPT qJ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686266979; x=1688858979; 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=aFeBvXSDSdHQDEP4y6c+chE/HON9+ZqSLzpectqZUCI=; b=IQ3+5u0aaQSqflNFQ5UMNbxPe1p6v/8DwM29Cr9VzQveqe+vt1Lcn9K1Mes5jCL1mA NKr5t7cX6FUTE3xxCR3OTJ7wZarc4rFedcdTLzTDv4rB6UCIK8G5XO4xwnjLOfmU5KEz t8L743cnAHW/aP0Cl5eTtEnMgZ900lEqrDn8fXKIuE/3T4WXXZqMxnvRMxbDUrXpJPoi S4DTgYjhD/kKnxV6mUgIwjpbcOS3QO9PlGXNIdkoKu5wpP03J+6rHcnU7jzDUq0Z2YYh tyzTNWyi6kJ4JVE/lWIMpN1bR8HTdD0YYOtbJfuto+zgV7IWzjTMwLJo1i/WRrgLJJpZ hrgg== X-Gm-Message-State: AC+VfDwvx/sm4peh6bsRhOlW5vRkkHkR4vjDLzflqj4DFxB2BHAGXKbq KyQPxgImBnY+DUuKBa1zmcyBpFIuCvrL X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:c3e5:ebc6:61e5:c73f]) (user=irogers job=sendgmr) by 2002:a05:690c:2901:b0:55d:9e7c:72c0 with SMTP id eg1-20020a05690c290100b0055d9e7c72c0mr648209ywb.0.1686266978828; Thu, 08 Jun 2023 16:29:38 -0700 (PDT) Date: Thu, 8 Jun 2023 16:28:08 -0700 In-Reply-To: <20230608232823.4027869-1-irogers@google.com> Message-Id: <20230608232823.4027869-12-irogers@google.com> Mime-Version: 1.0 References: <20230608232823.4027869-1-irogers@google.com> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Subject: [PATCH v2 11/26] perf stat: Avoid evlist leak From: Ian Rogers To: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Suzuki K Poulose , "Naveen N. Rao" , Kan Liang , German Gomez , Ali Saidi , Jing Zhang , Athira Rajeev , Miguel Ojeda , ye xingchen , Liam Howlett , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , K Prateek Nayak , Changbin Du , Ravi Bangoria , Sean Christopherson , Andi Kleen , "Steinar H. Gunderson" , Yuan Can , Brian Robbins , liuwenyu , Ivan Babrou , Fangrui Song , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, coresight@lists.linaro.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 Free evlist before overwriting in "perf stat report" mode. Detected using leak sanitizer. Signed-off-by: Ian Rogers --- tools/perf/builtin-stat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c87c6897edc9..fc615bdeed4f 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -2427,6 +2427,7 @@ static int __cmd_report(int argc, const char **argv) perf_stat.session = session; stat_config.output = stderr; + evlist__delete(evsel_list); evsel_list = session->evlist; ret = perf_session__process_events(session); -- 2.41.0.162.gfafddb0af9-goog