Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp505538rdb; Tue, 5 Dec 2023 11:11:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1uKXzbCDw/cWJ5sAneXTxUyJbIN2bT/gECBmFFVcfxVmQbxPscdK0wokOSJ3NKmaB9ERe X-Received: by 2002:a17:902:ee4d:b0:1d0:4cde:6e33 with SMTP id 13-20020a170902ee4d00b001d04cde6e33mr3014367plo.56.1701803476330; Tue, 05 Dec 2023 11:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701803476; cv=none; d=google.com; s=arc-20160816; b=jn1phcQxoftu+G9m4E+jW7FR4ViBAtWAPLFBJRGTw+OQOH1LD6PWtQaZfLIwwyyNco rBB1yjnIjG32QvjjDlrgcxrlnAMFbihmSSA7lL1gYloHh7N7IEqbVBdvBNVgsfmYFBMu KYad7yzhsnwFMi1YtL3WnRJ2xuaESyeiV1zLTa+UWJSzuPcPrf7TnRgtHFknatH7EzIl KShmzrxp6pEGXcpZOO87xqzepAOjoao17nYU6fcr5SvAgw1D9AGu8PIS+Qa46iCC1L+I hMY8ZtAZLIkqAWZmjiOY4r/HuDymaA1vB/8caS5WUYDUR4zug3hK718S4U+UjjQqJRgY 1YSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Pm7pkeiXPxJMy9VXevEhQKzkeemNvGy6M+EU+rjq3/8=; fh=fMnWOjU4lC6LjhVB6K4GQOWrm2WDrN6FsgE9i2qtFLU=; b=wUwvPvEwjSKhCYl5U6Ao/8IVIzSkXybwWyPeFZd0NCEH2BuZ6wj4pOFLsBs1T1G8HU TveNmeGz5tthyiJV0w/6YATVhw9MRl/ex/Uv/bSuldaYYiiR+USLW8jUv1WZ13qAoqR+ FQwBPYBVYvIAHGiP6qJ1qVTaE+uuEIK24YbHMUVj8liOHTyTgcKz+xVQZ5O9QWMhbjAC MEGVM+1Ytet9y9Zx171ay5tySB6FkjgK0YrQ1uCihlUZkxxp3UVjLViRUyxTpG4rRXdj 3cee38ROA6W9QDTYiSVF/It6ylnN9Ub2kijRxiEercFw9c/KTGU3HjAytT5VdwELjO6C aMcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i6-20020a17090332c600b001d0bcd70814si2436308plr.294.2023.12.05.11.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 11:11:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 102528035ADE; Tue, 5 Dec 2023 11:11:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231810AbjLETK6 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Dec 2023 14:10:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbjLETK4 (ORCPT ); Tue, 5 Dec 2023 14:10:56 -0500 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9552CB0; Tue, 5 Dec 2023 11:11:02 -0800 (PST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6ce32821a53so1895979b3a.0; Tue, 05 Dec 2023 11:11:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701803462; x=1702408262; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uODkYjBD6L0Z6eIxrtu/7Xfvr3I8XjBfQSMhqHB6Qbw=; b=ipe2IdNbsqbFBPAZEezWOtAtTDCKwS/xhqdqpGJlIfwOo35s/DUureXEgUUk6Mq+Q6 Bbb0rj0KiiY6KruDLlE2bGzEiaNqW9NafxRTrKAYsVBhgb6H5zZAECV18jKe9cpbfL8l pyLSq6L9dbf5Ny6lgo6c7DsAfRbe0gNrIM5PJPs7pVkTIAo3Z9+skGSxFhz2hR+Jwo/7 1EDLjTf5QUioDXaA5q4pAWsmYOuLkiDUM992CzBcfC0Axr559M86QqEywCuu6YVutg4Q fyCrRwD7VLQ43fVILXmQBKO4BbYYJWNKTt/5Hey0xUQw//27iE/Y0PJ3/FWX7bkVSe+9 rLNg== X-Gm-Message-State: AOJu0Yws2aaJir4fEp/I//hRgg+NMje1buhwOqoFg2ZCx6taHPQRQdKY m2CbsUUqdo7GMSXC0nDc/XJE7s4ddDArDsemLsM= X-Received: by 2002:a05:6a21:998e:b0:18c:a9d3:4f96 with SMTP id ve14-20020a056a21998e00b0018ca9d34f96mr3828901pzb.32.1701803461868; Tue, 05 Dec 2023 11:11:01 -0800 (PST) MIME-Version: 1.0 References: <20231204182330.654255-1-irogers@google.com> In-Reply-To: From: Namhyung Kim Date: Tue, 5 Dec 2023 11:10:50 -0800 Message-ID: Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set To: Arnaldo Carvalho de Melo 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 11:11:13 -0800 (PST) On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo wrote: > > 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". Done and pushed to tmp.perf-tools! Thanks, Namhyung