Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp35254ybk; Fri, 8 May 2020 17:45:18 -0700 (PDT) X-Google-Smtp-Source: APiQypL6e162JYlR6S+2rsKpo01EeANGzWtTYOjRXN7jbgF7wlcZZKX/n+Q1J2otwyYSX19WW6Cj X-Received: by 2002:a50:c01a:: with SMTP id r26mr4572061edb.361.1588985118667; Fri, 08 May 2020 17:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588985118; cv=none; d=google.com; s=arc-20160816; b=wH2Iq0wNDQgw56KrufBJItdFBdcbw5B3utNON0X4EwlX3PLDwtNO7K5wvtPwHOO7cu gFaAC36lDFaiLWOl2q3dexb0ulX8lIQJI7JipXWfjU89XUgIGWx7Z4oePOggj0K2r6/2 tncrsJcneCNVNf+m8m4yv3Eqr/VbfAARigGMbuwJ40cNDVLRWHKB8NNaFyaQ2uFRKMrc I/NtRrA+ZZzYzS2g82xxDxBTDmAnBCKKlKJx3+yO14eSt0aRHBx3ypjx47MrPZl8owmE CEK6q1Erb7uKWp5mRM5E+6/uZBij4gOysiHw5yBIX6Rj+OKurm/qRYAj6kz9DmWEdUdk 8RtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=apt6PtlX6aCenSSTB3xM+2wfl3pUWi+4h8MqzP3M6e8=; b=s8IBE+HSTjNebpR/1Z7XvtxC3py8c8bRdvr6KvHvQMjxC/5MNrPdXWPRNwhBVH76Ql OhOIP3FfMMxMvR3QOGUIXurGI3ctpF+ELLXlq1ARh5eMEdl9m6BKFS2zL+9TcATVF6HJ pptc1Fg69Cpi+2ilhEXZ4gj+G/q5UOVxXqdHX2wQbCbUIV5gmzAY2Z43BJfbjPQoZgzS gDwmVuy6ZjdtZtmQx794kBQ3hdB+oi4NEItGgoWAVzqHHCZunXoOrLh6WF1xlqFBUnxb LlBMl+da0QSIIMZ7aBgOxZ9+a1YCPbo0tR/82NhFcsD+QL1NQxnq3icOhHC7BC/qTa2d 4sMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BCOtYKeH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si1995313edm.285.2020.05.08.17.44.55; Fri, 08 May 2020 17:45:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BCOtYKeH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728494AbgEIAl2 (ORCPT + 99 others); Fri, 8 May 2020 20:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727878AbgEIAl2 (ORCPT ); Fri, 8 May 2020 20:41:28 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8AE6C061A0C for ; Fri, 8 May 2020 17:41:27 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id o198so1845699ybg.10 for ; Fri, 08 May 2020 17:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=apt6PtlX6aCenSSTB3xM+2wfl3pUWi+4h8MqzP3M6e8=; b=BCOtYKeHkJn1rMdkWGn8DLQyW/XIssArSPBRpqsIdRePmOcVhYhV7A7kBYytr7wBTV gjCPDuvKfioGwh3LP1ABMq8WtUgMqFZ/lK4LtjOmm206oksXmKGRTJPeD+hr6TjpeBw5 NRn0LhZ1DKqw1ryR/u8kY3VdmD5oPvPQ8l+YNAM7xdDU3vyc0ihsX74ASYtRtO3lp4rh d8iT/6guSGnrYgE8C2qNz3cBOciN5SPlQV50d0UWY4o5WJ/DCS7HnZRR1p4BhdrcM5Cu DBPcaCsQCGniJa8djxiVUQhK/9BlioqAEwamblDF1bfQ9Ap21IAyU7hAYTdbG4vCsY4O ZbLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=apt6PtlX6aCenSSTB3xM+2wfl3pUWi+4h8MqzP3M6e8=; b=s39VEZHe/5js/ocEuATK2kDWZ+Ckbsyn5lhQo1Uijgdd+vhRbB4ubq/C7fK/HTIJ59 PDRTZJJNRLofTEmGAP2avw/LGjGrJYi1L4Ngl2vj8h7NbcD0aItVYJL6mQNbQROcePu7 tLmHV4cTiF9AjGU/1N7QGe2hF4HK4OGVoURyLPjJCnUfDxmukrlFDK/iXoyFeCg8Zy0G /rM1v52mhXQwG4j9+Iw9PqWp/wclbbx+uJkLdWojJyCOtjayMWVzKzeoa9nLsxsAHyad TUgyohQ82qQZ02LEtBTxk4OFQxxSt5+TBVyRyY8stvF1ihEuNSKSeKqxLN9pfldBZtyY bKeg== X-Gm-Message-State: AGi0PuZKNN7QY/KQ60sA5+7Pn2KPzb0tsjH4CPIbT+hibQqIkWE58S/R a+6p2hO5En5kN8hTpAM8tpF5hXkbJfjbqcXGD40z2g== X-Received: by 2002:a25:d688:: with SMTP id n130mr8769766ybg.324.1588984886878; Fri, 08 May 2020 17:41:26 -0700 (PDT) MIME-Version: 1.0 References: <20200508053629.210324-1-irogers@google.com> <20200508053629.210324-7-irogers@google.com> <20200509003936.GH3538@tassilo.jf.intel.com> In-Reply-To: <20200509003936.GH3538@tassilo.jf.intel.com> From: Ian Rogers Date: Fri, 8 May 2020 17:41:15 -0700 Message-ID: Subject: Re: [RFC PATCH v3 06/14] perf evsel: fix 2 memory leaks To: Andi Kleen Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Kajol Jain , John Garry , Jin Yao , Kan Liang , Cong Wang , Kim Phillips , LKML , Networking , bpf , linux-perf-users , Vince Weaver , Stephane Eranian Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 8, 2020 at 5:39 PM Andi Kleen wrote: > > On Thu, May 07, 2020 at 10:36:21PM -0700, Ian Rogers wrote: > > If allocated, perf_pkg_mask and metric_events need freeing. > > All these patches at the beginning look like straight forward > bug fixes and are really independent of the new features. Thanks, for context I added them after v1 to make it easier to apply the patches. Ian > For them > > Reviewed-by: Andi Kleen > > > > > Signed-off-by: Ian Rogers > > --- > > tools/perf/util/evsel.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > > index 28683b0eb738..05bb46baad6a 100644 > > --- a/tools/perf/util/evsel.c > > +++ b/tools/perf/util/evsel.c > > @@ -1263,6 +1263,8 @@ void evsel__exit(struct evsel *evsel) > > zfree(&evsel->group_name); > > zfree(&evsel->name); > > zfree(&evsel->pmu_name); > > + zfree(&evsel->per_pkg_mask); > > + zfree(&evsel->metric_events); > > perf_evsel__object.fini(evsel); > > } > > > > -- > > 2.26.2.645.ge9eca65c58-goog > >