Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp508096rdb; Tue, 5 Dec 2023 11:15:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV5PXoMPr6vczNbTJ1LJKa+BWaYKQrd4Qv2R+7Q2+ANBifPyP+V+fWo/PEHc8eP8PCbdBM X-Received: by 2002:a05:6a00:290c:b0:6ce:2731:5f85 with SMTP id cg12-20020a056a00290c00b006ce27315f85mr1444851pfb.68.1701803726101; Tue, 05 Dec 2023 11:15:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701803725; cv=none; d=google.com; s=arc-20160816; b=FVA25PukRhDW+Vv6CYUQFJgx5HSELCbqUEbPltQR3QuJ2Vi9E5QLfkp7xtWSnRS1qO 1161AMZZ5Cf+kaOdi08AFgEi2WsI5SQRdGzRhJAtXie+qUDcsUZi4K41psGZ6SBXGYSG GYgUTaIiL2tVJ1ipK+LT7AzAs/01gqo5WlCz1I8FAp4es467bHerBFDRHvhkvUTV47y+ AStDbBQ0ewJt6Vy+ttYg2O4rttu6wpXRA3LIo5Y2qUixLBm46C5H6ml8lDDdW2KXjr9d s44fRzlj0D0kstsk4ra8MS3c0St+y8JB4oLAkuObKHdcmygg+/QJamkAgqb+3A9Qd5w8 1jOg== 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 :dkim-signature; bh=EjNkOH41w29ta79KWUOUY4u7veXqkuV98gB+b0cOvYw=; fh=ednl8Mxzm53NVO/kILArs79am2Mz/ciHu23UeY8/eps=; b=pQhkAlSlKrNN6V2Q5mJDNyRWFRvT2nhQgKyrE0GMmt+whRJ+E2BtTzsWnUDGqHbubp vvQeH7uStr/qNzhkQEDxHtQ2/5T2SSINwbTCf7S+eAkj3M0f3oe+1oNIpZevwuJCP2Wa FHMUH3QZ4N+nEL+6bEjJRg5HeyU9CrPrc+xcXtAH1icvG2eXqICHxHxxzfeB+VMyoaZU WHKKuq8zxKTy/GApRHYwAn/1hlTteVAjg5f0ki0FQM5BZ9VvNjhX45IpMGgeDeAvzucB +NBZzSOaHce1D65sLfMpfPycu+rq8XeLhxeK3hnPxCgXgWM1V7x1yFIM2L1AhqShiWrT WADA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1IRwzlic; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x20-20020a056a00189400b006ce6d618505si1527191pfh.166.2023.12.05.11.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 11:15:25 -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; dkim=pass header.i=@google.com header.s=20230601 header.b=1IRwzlic; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D46638032EFA; Tue, 5 Dec 2023 11:15:07 -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 S231736AbjLETOy (ORCPT + 99 others); Tue, 5 Dec 2023 14:14:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjLETOx (ORCPT ); Tue, 5 Dec 2023 14:14:53 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CFE6B0 for ; Tue, 5 Dec 2023 11:14:59 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50bf09be81bso420e87.1 for ; Tue, 05 Dec 2023 11:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701803697; x=1702408497; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EjNkOH41w29ta79KWUOUY4u7veXqkuV98gB+b0cOvYw=; b=1IRwzlicKqhGEkRpjKUmlmXh1FebwZ/Y6kFA87IqK+PiGwp7LvB17Z2/0/UUi5J+5w CJbSadIr7krBOjv5sFtFtmsX/20EIg/woY7Pja6TVaHZumJ5xYKnRLk29ifPwQv91NRk ZvYIuj5lxErYkBB143x7Tuf0hvlduk0KtVsyxq2mJz8HhyA8Dm3t8FBDSn+lzWJSb9si DS42QKHcVpETpgYEtAHZq7kcNcxmkBlq3nQgWvGQFnx+ygSDJWjTh9TQH9DhC6Id57Dk gprQbvygEV2TB8BGHEkKpppHEGJmgzRw2M1FKYLNpI4SVw2nOc9nJ9dtkgQvt4n5tZJ7 kzLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701803698; x=1702408498; 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=EjNkOH41w29ta79KWUOUY4u7veXqkuV98gB+b0cOvYw=; b=iiht6DnQU2S0QXdGzwcYCOSsmoI2tY8khEq0Jska3UH9gnn92D3E5dQHo38P5xh6Fq g1vCbIe4dZgzgGK1diPyaWGUu278qC2RmQR2y5vt46Tp0jH/uHEJUPa8n0gN9NlHGYKm KCdNzDvnmx0dBIOdB8WfLZTVbvQIrUuGy9PlWIG81asBfoU2V/rD+2nRUcN+slaV2ndg oa7G+6Tpin7e/bnAa4kwfVrp7U8+uf4l9StZkH2nzUaYfN+Ed+OI3dqOGfFwW06KhCfk qMVvJShWUEpsNZ76USvXGGUYDgdcpOZdpzpY+QnwUhVYOONlNLR/ZiToDtNGQN5OhPUU rZ8w== X-Gm-Message-State: AOJu0YxcV683jYfukUnNbFD6frqWeA6Yhs9+4ik/PLeoD8GP17tuAzBN 8SdGahw1ldxc5WEi5+eK4g+TE9o9FMbEOSdOn6XdrA== X-Received: by 2002:a05:6512:e81:b0:50b:ea5c:2823 with SMTP id bi1-20020a0565120e8100b0050bea5c2823mr9416lfb.2.1701803697521; Tue, 05 Dec 2023 11:14:57 -0800 (PST) MIME-Version: 1.0 References: <20231204182330.654255-1-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Tue, 5 Dec 2023 11:14:45 -0800 Message-ID: Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ilkka Koskinen , 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: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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:15:08 -0800 (PST) On Tue, Dec 5, 2023 at 11:11=E2=80=AFAM Namhyung Kim = wrote: > > On Tue, Dec 5, 2023 at 10:48=E2=80=AFAM 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=E2=80=AFAM 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=E2=80=AFPM Ilkka Koskinen wrote: > > > > > > On Mon, 4 Dec 2023, Ian Rogers wrote: > > > > > > > A metric is default by having "Default" within its groups. Th= e default > > > > > > > metricgroup name needn't be set and this can result in segv i= n > > > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_met= ricgroup > > > > > > > that assume it has a value when there is a Default metric gro= up. To > > > > > > > avoid the segv initialize the value to "". > > > > > > > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgr= oup") > > > > > > > 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 w= hat > > > > 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.amperecom= puting.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 c= allback" > > > > 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, there was a typo in Arnaldo's commit message "s/fuplicate/duplicate/" could you fix? Ian > Thanks, > Namhyung