Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1295382ybg; Tue, 2 Jun 2020 06:27:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrrN8cJRFFEFI7c16DbGNJqjRib5qfszW2Oaz2Ayis7RRCX4pc0i3xX2ACexnPJpq6wkCN X-Received: by 2002:a50:9dc4:: with SMTP id l4mr7356951edk.52.1591104475477; Tue, 02 Jun 2020 06:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591104475; cv=none; d=google.com; s=arc-20160816; b=HtjdH3u8mhgwLf0Ip+t6fAiW1rp8pnMsFQfpBqVlG1GXNZfQRKNqk2nWgr1E+ayJdG /lhccYB4HuleLX4aHLZ0D9/DHmoDL4Id5iQTQM6kmhIA0VSgpMMT8j5qlYC+3HlpH/Vn mQgEUREyut+3oKPQKP0+xt+8MZHFsL1StCPG1gRjxzeMin/QGVA/XCJ2uT6XV6mfe9jk bMlswj6vWU1pSdyO+rz0wv8THlBstoKu2DsAaeLqGKEBQHS4onBseYgm4l80LlO+HZ0f OZ0bufkF0R0bUkjAmh6dWQF8lX58c4ACTWLm4cp9EQ5IXRwIGxp6sHQqkRqd3U/6DvBG IlFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LPl816arLy/bX1hM1IgVMarl5eh6ukqA8Ne8Ak3XJDc=; b=OcxcfpVreCEFsIh8WhEjoFeYhFeySCIYCVFESdAOPqIUb4c/HRlk2Gnp3pLzLuTCT+ 1Tx6nAq2gtFhPhTHm1rec9B6gDy8SiVjJc26i6uJup1DNj4DgrbVamIkisURHRgQXZjM YjVhw/5ItG7L98riFTkZ5qAQJtAW7H2bqQysIXA2zW9i4LMv6vGJEhBR6oL9RPTeMRUD TX+4BF85RDyLzUTKmKC5p7n0+S/UxqHKgK9+VXDbbWUOLOURduLYERVjaR7T1y+tUBe+ khBUlD6nHY3njoXTXPLknJcq+0CISN7cQoxl+xfjdUlFxrrNe4nCpnNSNO3nLRCDuVf+ nj7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uOa9z3Dn; 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 v10si1688316eda.476.2020.06.02.06.27.32; Tue, 02 Jun 2020 06:27:55 -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=default header.b=uOa9z3Dn; 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 S1726648AbgFBNZj (ORCPT + 99 others); Tue, 2 Jun 2020 09:25:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:38522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgFBNZj (ORCPT ); Tue, 2 Jun 2020 09:25:39 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03AE3206E2; Tue, 2 Jun 2020 13:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591104338; bh=/ot6KkkhG77B8zC3BQNhueVZZBjdlYBGN3Vpm55MFHc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uOa9z3Dn6m8SHnpVqyXvSRtsAEDxm+ENn+iyiWk1jKlscnc7GvxSu7Fic34biu/7q 277LuZ8vh6TyPWLDE+tWq+tl0tjuei/+5hFa2JUyS/pkmrcuysjTpWIcnUh+VW+pcg B6/k60GsmefavO8MyAceHwZdZ8XTKpu1CM/NSkO8= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5153240AFD; Tue, 2 Jun 2020 10:25:35 -0300 (-03) Date: Tue, 2 Jun 2020 10:25:35 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Namhyung Kim , Ian Rogers , Jiri Olsa , Jin Yao , lkml , Ingo Molnar , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Stephane Eranian , Andi Kleen Subject: Re: [PATCHv2] perf stat: Ensure group is defined on top of the same cpu mask Message-ID: <20200602132535.GN31795@kernel.org> References: <20200531162206.911168-1-jolsa@kernel.org> <20200601082027.GF881900@krava> <20200602081551.GC1112120@krava> <20200602121017.GF1112120@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200602121017.GF1112120@krava> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jun 02, 2020 at 02:10:17PM +0200, Jiri Olsa escreveu: > On Tue, Jun 02, 2020 at 08:50:17PM +0900, Namhyung Kim wrote: > > Hi Jiri, > > > > On Tue, Jun 2, 2020 at 5:16 PM Jiri Olsa wrote: > > > > > > On Tue, Jun 02, 2020 at 11:47:19AM +0900, Namhyung Kim wrote: > > > > On Tue, Jun 2, 2020 at 1:21 AM Ian Rogers wrote: > > > > > > > > > > On Mon, Jun 1, 2020 at 1:20 AM Jiri Olsa wrote: > > > > > > > > > > > > Jin Yao reported the issue (and posted first versions of this change) > > > > > > with groups being defined over events with different cpu mask. > > > > > > > > > > > > This causes assert aborts in get_group_fd, like: > > > > > > > > > > > > # perf stat -M "C2_Pkg_Residency" -a -- sleep 1 > > > > > > perf: util/evsel.c:1464: get_group_fd: Assertion `!(fd == -1)' failed. > > > > > > Aborted > > > > > > > > > > > > All the events in the group have to be defined over the same > > > > > > cpus so the group_fd can be found for every leader/member pair. > > > > > > > > > > > > Adding check to ensure this condition is met and removing the > > > > > > group (with warning) if we detect mixed cpus, like: > > > > > > > > > > > > $ sudo perf stat -e '{power/energy-cores/,cycles},{instructions,power/energy-cores/}' > > > > > > WARNING: event cpu maps do not match, disabling group: > > > > > > anon group { power/energy-cores/, cycles } > > > > > > anon group { instructions, power/energy-cores/ } > > > > > > > > > > > > Ian asked also for cpu maps details, it's displayed in verbose mode: > > > > > > > > > > > > $ sudo perf stat -e '{cycles,power/energy-cores/}' -v > > > > > > WARNING: group events cpu maps do not match, disabling group: > > > > > > anon group { power/energy-cores/, cycles } > > > > > > power/energy-cores/: 0 > > > > > > cycles: 0-7 > > > > > > anon group { instructions, power/energy-cores/ } > > > > > > instructions: 0-7 > > > > > > power/energy-cores/: 0 > > > > > > > > > > This is great! A nit, would 'grouped events cpus do not match' read > > > > > better? I think the cpu map is more of an internal naming convention. > > > > Allowed cpus? > > > > > > hum, what you mean? > > > > I mean that we can use 'allowed cpus' rather then 'cpu map' in the message. > > Something like this? > > > > allowed cpus for events in a group do not match, disabling group: > > hm, I like more the one Ian suggested.. anyway, leaving this to Arnaldo, > he can change that before committing ;-) I think its ok as-is, Ian, can I have your acked-by? - Arnaldo