Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp665687pxv; Thu, 15 Jul 2021 12:55:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLssvhQ1aHTUwVkTfNYYxY1t6R9uzP18LlpKXvcUFhZnO+GdWbkgdouuSUk8/oe6bM9vO5 X-Received: by 2002:a05:6402:3454:: with SMTP id l20mr9378176edc.170.1626378899858; Thu, 15 Jul 2021 12:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378899; cv=none; d=google.com; s=arc-20160816; b=VUAnpLhnd5ZOVVets0MX5b3Oj/ek6orjJHR4aus8QZXL5RvICT4RAABoYbaiiaSASI LPj2tBdqPuhJ7FzjXDf5zm1Prk2K+E7mnYjBX7AD2GMN3O3fOiPPFqkA9xeN6RzJhIL2 23jZQaJTOagJTodliQiyMAddebSNQ/vbMVzdr7xH3ln+7CUNVLK6KxAM8Ks+6/CoCon/ f5rQs2IE/7+Y58GV0kCC3ozynKq3pMgXPwH8KzJEHokLP2xC3s6hgDQMREKuAVu3xiSC A1JBBADChEteMlDmI0Tej2GoIAYAWvmFuHy00NAQpPCC4v5DIGmpqZbWARGtYb4Z3+qu h/8w== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zERx5tWvehUG3hzxJOzIeu+iuDDYIIdyoPf9LAF9lsg=; b=qRsR5RVbXptIFZnGSy3Tfh+lKqpVadk2fZVfQFa0rJ7kzREIjgnpjf5h2vPeTRK45Q zLVL5rMYVISvmyUldkNWlxQSYi7/xF+9frcqax+H+aGbdvLMQdNMGtDsBhX7lFSvb8Fs 6wcl5+8RqVsN1xjsC3e2JAMYRrrsPgYMAQEFaW6C/ToOpRdChLYduNE4ydmpI4eseQjd rmsFRJSWr9vTZxaVOhx7dlrQC0XZDd3gHoLKg3XYCp2+Fb/l5wr306xz3T+Z2K77Q9c6 halkyWoGZbRXXaMTJwdku41XNpws0urmGpA5lzaR/Um1eirAdG9EOcETz5hS/BBVsPBU 7n9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xx6cGAYx; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz16si8514376ejb.310.2021.07.15.12.54.36; Thu, 15 Jul 2021 12:54:59 -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=@kernel.org header.s=k20201202 header.b=Xx6cGAYx; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244812AbhGOT41 (ORCPT + 99 others); Thu, 15 Jul 2021 15:56:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:44676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347358AbhGOTwX (ORCPT ); Thu, 15 Jul 2021 15:52:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 107D061073; Thu, 15 Jul 2021 19:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626378570; bh=KXCm1A076DPrtlFUA5qZsd5SDqWL2dBoIWTzb3neksE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xx6cGAYxVKkd8Nn8Y1gjAtKqpfTnEOxrL/iST7NHGMwQ6rM7m+YBVu5jJotgkCpPi CvjU0i7bJDkVGa+qHkfjoof92pw7W69LoWmmHjF4H9D+x8JaCoA2nsBctn3/EJxoPS dRdZvG65hmylmAb8mbwyM6HyezY56b/spuTll7lgnSEECs5r1X+S5sXgz1RjkrW6dT abMVWfyggRQEA7m/1bymNPQ64NKZOEBJx4kpWnztsNCAoHCoYNM7H1MyVJLPPtzRHz VqUZNpu8ZdxFcT7CJ4sUgqHORxdmctBAwmoz15LLIKw3XuWzLAFP1+VAPiKvo0wHVN Gj+yi3Vfn49aQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9E6CC403F2; Thu, 15 Jul 2021 16:49:27 -0300 (-03) Date: Thu, 15 Jul 2021 16:49:27 -0300 From: Arnaldo Carvalho de Melo To: Riccardo Mancini Cc: Kan Liang , Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 02/20] perf env: fix sibling_dies memory leak Message-ID: References: <2140d0b57656e4eb9021ca9772250c24c032924b.1626343282.git.rickyman7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2140d0b57656e4eb9021ca9772250c24c032924b.1626343282.git.rickyman7@gmail.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 15, 2021 at 06:07:07PM +0200, Riccardo Mancini escreveu: > ASan reports a memory leak in perf_env while running the perf test > "41: Session topology", caused by sibling_dies not being freed. > > This patch adds the required free. > Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology") So, I CC the author of the patch and its committer, using this shell script: $ cat ~/bin/fixes #!/bin/bash cset=$1 if [ $# -eq 0 ] ; then read cset fi git show --pretty=fuller $cset | grep '^\(Author\|Commit\): ' | sed -r 's/.*: +/Cc: /g' | grep -v "Arnaldo Carvalho de Melo" | sort -u echo Fixes: `git one $cset` $ $ grep one -B1 ~/.gitconfig [alias] one = show -s --pretty='format:%h (\"%s\")' $ $ fixes acae8b36cded0ee6 Cc: Kan Liang Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology") $ Normally I copy the cset SHA and, in vim, select it and run !fixes, i.e. :'<,'>!fixes Thanks, applied. - Arnaldo > Signed-off-by: Riccardo Mancini > --- > tools/perf/util/env.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c > index ebc5e9ad35db21d1..6c765946ef6f591c 100644 > --- a/tools/perf/util/env.c > +++ b/tools/perf/util/env.c > @@ -186,6 +186,7 @@ void perf_env__exit(struct perf_env *env) > zfree(&env->cpuid); > zfree(&env->cmdline); > zfree(&env->cmdline_argv); > + zfree(&env->sibling_dies); > zfree(&env->sibling_cores); > zfree(&env->sibling_threads); > zfree(&env->pmu_mappings); > -- > 2.31.1 > -- - Arnaldo