From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28D9BC433E0 for ; Sun, 5 Jul 2020 05:25:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E804C20874 for ; Sun, 5 Jul 2020 05:25:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AxS0jGqB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H/FIIOuI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E804C20874 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4WWkEP+ICp6gO88GGEUs0Jt3q5SEXQFWzTlNih0jB4M=; b=AxS0jGqBKrHltlm7v45m5VuSb YnI/HGxAwerXDXqKSBW+aqWv35+bvbFx28wEWOd8XMfweRV3MpleWf+qXnZZPJKYBnEMVgrwarmbf Yn1pPGbFMVS0hYtbDV2AcraGxV3Xwhzkj0EyvmM1L16A6MtwUH/ZB4xsHn1AeMF3YCelav1AAAURM hUaWN0qjWHFch7ALfj8m2vFK2G0jrMgCh5rjjlX5mqRwP1IfSQ/a40BIG32i+vlziByaQIK7P95Bi UsLHrl+PGb0G5mSFahJb43Di61kcneuHb5eaydik0x99pRRh/Wg7YtxBXHfxcU/C5x04jz7NlbLwB ScOeCjHyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrx8f-0002o9-QZ; Sun, 05 Jul 2020 05:24:29 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrx8d-0002nU-4N for linux-arm-kernel@lists.infradead.org; Sun, 05 Jul 2020 05:24:28 +0000 Received: by mail-pg1-x543.google.com with SMTP id z5so16899836pgb.6 for ; Sat, 04 Jul 2020 22:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/d0fVnkkMj8AqjSj3lBRC3Gn3NS10oGmVycuIL3B8SU=; b=H/FIIOuI+LgP/oYZqzk1uF4CUjbh3SidudmmGTAMb6jZEcFjT3AC5y24LPBZaBd6eD RU1e9Srm+BcANmkr3q0wEfdS3zQziFNWSHCCVRQ81AN+79KmhEaqQpmziG/SZnwYotgu NbsEvpzAaBiU28WDhjxO6xj5x1CgjR3wlPstnF5FMQQ2jxlnyvz2O6+wHEA6mN2kGSij NykuilDWYnpf5IMAdX35MaXODOIrw4+xGwIlqpB6DARCq5XWwyM1k2TCLXvzQ91O0ciS KH/gi2k3CXQwQk11K/y2C09ZMRs/SccrehXKRwyHnj4HdHR10ABJKItdJnSFH+l6Eyi0 l80Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/d0fVnkkMj8AqjSj3lBRC3Gn3NS10oGmVycuIL3B8SU=; b=TO1u7oQzVtqSvHFRDrE7YVA/BZ+mr7VdaoQ3kTFpDHdJ2AEFoOeYCRPTPEckjh4gpO eTtMbjrKj00jCCOzURzbo725qpds0OYfvW9wqbWtYIYb1ZCCqFNigUAv6/cAnXPfYbvb 50rVD+2Mg3ottlbv2Mg/mTlitFx1Z6PFnLqCMdT9KNeNvNWvsxLC8aeJa3mgSBiap7Cc PAXoDdwcODcrc15HNUVvOS+QqPRby3ycBCDI1oNY8EamQ0GqiPQu4QQrPuSYwHg0gorY MgL09kpNlGApjVpIBvHPc+dndDvveRAlnXm5HL59otoe/Al7So7TEnixERKX7cO11y/S DbBw== X-Gm-Message-State: AOAM530V/vmvOtz5ReMoYF8kd4/zfgsGuxS5gvTICno2zHhelE9GIick qyLDhQ7d3WljNlTPqhQC4toqvHObXhIvdA== X-Google-Smtp-Source: ABdhPJwQVWd+xcc5oTk71j+2DNUJ61EGqtXZ8Fc7mnfUkHaXRItOp8NtIwrsMlobGAPypEQkyWzU8A== X-Received: by 2002:a62:8688:: with SMTP id x130mr39800756pfd.280.1593926664017; Sat, 04 Jul 2020 22:24:24 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id y27sm15883257pgc.56.2020.07.04.22.24.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Jul 2020 22:24:23 -0700 (PDT) Date: Sun, 5 Jul 2020 13:24:14 +0800 From: Leo Yan To: "liwei (GF)" Subject: Re: [PATCH 2/2] perf tools: Fix record failure when mixed with ARM SPE event Message-ID: <20200705052414.GC14142@leoy-ThinkPad-X240s> References: <20200623123141.27747-1-liwei391@huawei.com> <20200623123141.27747-3-liwei391@huawei.com> <20200702230322.GB471976@xps15> <5d872f6f-3665-5abd-7251-13926a70f793@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5d872f6f-3665-5abd-7251-13926a70f793@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200705_012427_340342_F279B6A1 X-CRM114-Status: GOOD ( 14.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kim Phillips , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Jiri Olsa , linux-arm-kernel@lists.infradead.org, Mike Leach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 03, 2020 at 12:06:15PM +0800, liwei (GF) wrote: [...] Thanks for Mathieu's looping and agreed with his comments. > > Last but not least do you know where the memory allocated for array arm_spe_pmus > > is released? If you can't find it either then we have a memory leak and it > > would be nice to have that fixed. > > Yes, we have a memory leak here indeed, i forgot to free it in this function. > As 'arm_spe_pmus' is defined as static, i think the author meant to assign it only at the first call, > but this function is only called once when we executing 'record', should i go on fixing it > or just drop the patch 1? I personally think patch 1 is reasonable. So for fixing memory leak, I did a quick check, it's good to release the array "arm_spe_pmus" in the function auxtrace_record__init(), since the array is only used in this function. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel