Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp712278rdb; Fri, 26 Jan 2024 08:25:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWBuPkn2342UnSxjUqsjsK+nk5PJ+nRo70FI3QYwai+4yDA/dESO9y8GkbCQ/BzkZvm774 X-Received: by 2002:a2e:be8a:0:b0:2cf:12a2:c1fa with SMTP id a10-20020a2ebe8a000000b002cf12a2c1famr8530ljr.215.1706286351131; Fri, 26 Jan 2024 08:25:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706286351; cv=pass; d=google.com; s=arc-20160816; b=NlfaIHzO80wVgdongaStFLi6rB51PwWZ5M5BMP2tzC/P5EyN+U8q6ZbIZQWXIsKqPh HnRA6lBkyMJSp0yhkrvEKwcZRbukWMGfEdFx0IIScwTIzvIk/niC+1phqrXp6jgJ6bmc DfKYsCJf7UOAzbQOr5cyjSDNc+s3GvgZ9Xw2mm1c7Gf8s3wOqdHunvEFcUrlMadFVy9Z bsrW8smQepLeZTkyEFZaqI4OhjNUZ2M0JTMRTLgWdeAbgVvwifdA2pRly60cwFSSjSI6 ai/V8w/G6ajUsnal3FKG10vYdpEC5wCI283yHp8aamjBNr2rQ4D/Hs5g/aBRqsym4nEx gaow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=72jnNmu5wwV35bkZSJQSCot/tm7byNDkVkRRofAZTxY=; fh=zilmCPZqw26QAs3CCF7gUqygGBMGlIpBSPpFuemB9ow=; b=fQyZbP3QiKRj1G+iZNpXwE7CTySceGTOgCIpas5noRHJRtKlP7/xzuRb45/D5Re+uV FIhomAGXtDHiU2Q+1JrUn+BhL6OWBIRNKQl6NOyu3N66vGPZGho8HKQ49FltlmMC3VyE VtpvJs/Cat1B+rUnKc7JeHZD8vtGR+G/Alrwt4ezMsCChTcP4uX5lMCNmGX2sJcwg75t WGjFSmiHFc5vedyeFhwCwgpsyvMr5S8AKSCe6gdPUzlf8wcax6wDXqebRCPARe6m9RAw nYRpiY0xALOLG4AKlGao1gF/oZ4qIpOFplOKlNz4ZnH85ogoHRi7sASKKlCK6JO855T5 h4eQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qRuSvS9x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g1-20020a056402320100b0055dd983bce3si98254eda.641.2024.01.26.08.25.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 08:25:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qRuSvS9x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AF8711F255E6 for ; Fri, 26 Jan 2024 16:25:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4861A1DDFF; Fri, 26 Jan 2024 16:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qRuSvS9x" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 629F11D6BE; Fri, 26 Jan 2024 16:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706286334; cv=none; b=OUJ2FvgUKOXKetThMK4zRtYeEntbIPNJUBwwg8FEAhYWhFw0TCKeq25jCEk1hxg+FkLk/y7/E2AFdrIrzMG8MrYR57V2/RDmSytjyx8Dek6dkWFKpFr3T1y+vraU6QiVXxm8Q5XT4mEWxnr7X0G9TiMMB1YrquF/aHxjPh5I7vI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706286334; c=relaxed/simple; bh=DfiRLIgoHi+38BtPH3e3fTQLMA+gmNR/PlVDe0aSLE4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KTI0AH1ZP3dqVGFczwixgKwgdvNIj+BsEEeZstqxXCHv2zskG6byjrYlHa16ZeOtfR6izvZAGDSe4dNSxWjLAxfRGciBgVYFXS9e1tEqFLV/hhI13GOvEZrwnIL4VkRbWiY/Ql4z13wKy2OS6ozen09/4d71BMOljAU89UNZEi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qRuSvS9x; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA9C7C43399; Fri, 26 Jan 2024 16:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706286333; bh=DfiRLIgoHi+38BtPH3e3fTQLMA+gmNR/PlVDe0aSLE4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qRuSvS9x/ormIZak+Jk7Smge4qyqYrGWGsPT0Ssq3xD6YwTLemD861CFKeMhfaelk +H10YzOrhQvtRuLzeW2TcV1LEwRSHqZGhd9TQa1tY7UJBsZ4upPSPCjQ/N1nnLRxcD YN+U8pdtHDroTkuz7dwXN4YPQcHDTcWoKzuX95U2wcuQUmO9otv7s7TYlw3LjW9OgO jlNjoXkb+dBZHGJ0uMwlYqIpFJSm3MneJbQ1mYpHWXQ1psJNpm/x0Q3rqNGV23qNHo Jj1Oss9R5C/VC/KfaQbXYqneahf5tQ9ahmcxBnT2bPS+taGXdqqsL4EenHmuGpxjFx oNwAb33+MyIjg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 23DFE40441; Fri, 26 Jan 2024 13:25:31 -0300 (-03) Date: Fri, 26 Jan 2024 13:25:31 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Namhyung Kim , linux-perf-users@vger.kernel.org, irogers@google.com, kan.liang@linux.intel.com, mark.rutland@arm.com, Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Changbin Du , Yang Jihong , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] perf evlist: Fix evlist__new_default() for > 1 core PMU Message-ID: References: <20240123102728.239147-1-james.clark@arm.com> <20240123103918.241423-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Em Wed, Jan 24, 2024 at 09:03:57AM +0000, James Clark escreveu: > On 24/01/2024 00:46, Namhyung Kim wrote: > > On Tue, Jan 23, 2024 at 2:39 AM James Clark wrote: > >> +++ b/tools/perf/util/evlist.c > >> @@ -106,6 +106,13 @@ struct evlist *evlist__new_default(void) > >> evlist = NULL; > >> } > >> + if (evlist->core.nr_entries > 1) { > > I think you need a NULL check for evlist here. > Oops yes. Or just return on the error above. Was there a v4? I'm assuming this is for perf-tools, i.e. for v6.8-rc, right? - Arnaldo