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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D87BCC4167B for ; Tue, 5 Dec 2023 18:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232230AbjLESsl (ORCPT ); Tue, 5 Dec 2023 13:48:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345371AbjLESsf (ORCPT ); Tue, 5 Dec 2023 13:48:35 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A02911A1 for ; Tue, 5 Dec 2023 10:48:41 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16059C433C8; Tue, 5 Dec 2023 18:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701802121; bh=5KqBzScuuu0YI5DInZYG3ftxv+0rWvUyxh+PzEZeATI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QZKjDzvkJSQBXK8TntRGXYf2rczkwCY4sVeQFHovoP2DyA2ysnAM4Gy/c055Iz9I0 FsrwMI1YY4txcLFV93Eiowat8OUq62y0GCxEQjR6EFbysWa518vbGByXwdFioCbLE5 PpelimSqY+EyUYZkFOccUDaoWdL4IkSqH3UDdxeHoulCpUo9JrMHkejsGm2lxCkdgN xwVVh+Q7iZDMt+bv/dBfM0Np37JNAC/vQ2e1mYpqPCvnVzkZejyUfrXHRN1elk5ECw ewPxsQtXXWkyBK9dUjeBClATbpE/VLUSM5/IzywmpSrJJDbRrBP5KK/YvsYqWMIWOh nhDV9V8ve4/9w== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 3CE7F40094; Tue, 5 Dec 2023 15:48:38 -0300 (-03) Date: Tue, 5 Dec 2023 15:48:38 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ilkka Koskinen , Ian Rogers , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Kajol Jain , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set Message-ID: References: <20231204182330.654255-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu: > Hi Arnaldo, > > On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo wrote: > > > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu: > > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen wrote: > > > > On Mon, 4 Dec 2023, Ian Rogers wrote: > > > > > A metric is default by having "Default" within its groups. The default > > > > > metricgroup name needn't be set and this can result in segv in > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup > > > > > that assume it has a value when there is a Default metric group. To > > > > > avoid the segv initialize the value to "". > > > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup") > > > > > Signed-off-by: Ian Rogers > > > > > > Thanks! I was going to look for the bug but got pulled to other > > > > tasks. The patch looks good to me and I tested it successfully on > > > > AmpereOne. > > > > > > Reviewed-and-tested-by: Ilkka Koskinen > > > > > Looks like it needs to go through perf-tools for v6.7. > > > Ian, do you think this one is enough? > > > > So I had this on my local perf-tools-next, removed now, I also have some > > other fixes by Ian on the tmp.perf-tools-next, please let me know what > > you guys decide to have in perf-tools for v6.7 so that I can remove it > > from there. > > I think we need this one and the Ampere default-metric-group fix. > > https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/ > > Also perf list JSON fix can go to v6.7. > > https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/ Ok, removed both, please augment the later description to: "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback" The original description was vague, improving it a bit like that helps when just looking at the output of "git log --oneline". Thanks, - Arnaldo