From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796170301; b=hpzJeiHjTMFWbRLk03uznXwpH7ceq5ClxmVZY0+3ZFUMcJF+3VfqYvaGD4evcmsrmsuc 5p5rwusbLpqCrC/qaRf9/BwNfrYI+9Iv8+r6PdXuGpNXo17FNjdn+FxpnFsBlR0iKEKFq 8+VgGmCeYMWFEty1IFXjvvs/EPgSRzkm1GmmmgXjvZpRa19StvgdxL4UwZn1+dC3eA5eT YvWyoT6xeMGvaSnEwQrxCGpjKxAgIMqlSaWk93aMCkhSVfXFi2TNostZh97sSJqlw9Ir0 Z9xvNIfJSJ2gpcmwFaBCvvuzlLVu1VPbZEWXPR0VtUa0dsgMMhuzgNh6aUFlPMv3o/g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796170301; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=1ofCp287jaFLk8a/ee0lNjPIayNFQ0AYstJSLjIfE8A=; b=t/oTEDw2WvJI/zqfHMmjz8AgLXXyyZi9EyyMiSwZkIft2nEhZ2wUMQWgmitdKzID4JcE 3ZqaiS06KtVdBm7ET7r50zu4zO84Cpk574Yw62QhFMPWXGGTsDhly5e7aVaSUxwI27D30 TZHooJz2rDb30qaODrpbXPbcmkKkJ4weWtgMVtLwN15uVsftJIQi9uvQd22QR5NEVypFw dlc8ki3ecWXsgW74PIaSM2DZIjN0Nq1mKgWqC4KonBJ2n6EoszdERcsyEts0y18+ZIQjO idHgEwXpFpA9+f8tvmTHBeTJJtU2OnzZHQSxSpDjsVkWcM8wn9jHtBASAHyyleAQjsg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KonUfHoX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6AF8606A31A for ; Wed, 2 Dec 2026 00:11:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KonUfHoX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 528B41F000C1; Wed, 2 Dec 2026 00:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796170301; bh=1ofCp287jaFLk8a/ee0lNjPIayNFQ0AYstJSLjIfE8A=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=KonUfHoXBD7Ln/OliyTPo1ZDpzvwpEX/JJYXJrY36IBkSdbGAOa5wkh6+nxY4nNoL eFB7nE7aIeKj6YxDdcixibNNUXbQ/Xc/Uk0BZ8H8AqnVoNZD5ULbf/Q8pG9qwAY0O8 xcVswAvYDjtxepCQiLT/bhi1LrXw9kF27U4v3RTSv+rUSdUTVzZMnseB1wqm1QPf44 czwKMHXR4aiUmdf2KOD7/ABH1xjdtd2OM4ff1xtkGMVwhpi+z+k48rHkaoGAVpZx7d B2sHXpJ7zUSdHVjx87HqC0VhDJ3tAINtMKhabGNgxwLYxEuCaHStdxWVm69YEH/nH9 +5uStq2UWST3g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v11] perf stat: Refuse a group mixing tool and kernel events Reply-To: sashiko-reviews@lists.linux.dev To: "TAKANO Mitsuhiro" , linux-perf-users@vger.kernel.org In-Reply-To: <20261201235504.2534857-1-takano32@gmail.com> References: <20261201140836.2320511-1-takano32@gmail.com> <20261201235504.2534857-1-takano32@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 00:11:40 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > A tool event has no kernel counterpart: user_time and system_time read > /proc/stat, or /proc//stat for a workload, and duration_time keeps > its value in perf itself. perf-list(1) says events from different PMUs > cannot be grouped except for some software events, and the tool PMU counts > as software, so a tool event stays in the group the user wrote. >=20 > A group of a tool event and an event from a different software PMU, such = as > cpu-clock, is split by the parser, and evlist__check_cpu_maps() removes > members whose CPUs do not match the leader under -a or -C. hwmon and drm > are not software PMUs in that sense, so such a group is refused rather th= an > split. What is left is a group that cannot be counted. >=20 > Before this change, with user_time or system_time as the leader, > get_group_fd() handed the procfs descriptor to the members and the kernel > rejected each with EBADF. With duration_time as the leader there was no > [ ... ] > Link: https://lore.kernel.org/all/awC_aZXD5FBGu4mO@google.com/ > Link: https://lore.kernel.org/all/awTXdgY38s2bijW5@google.com/ > Cc: Ian Rogers > Link: https://lore.kernel.org/all/20261123071913.653315-7-irogers@google.= com/ > Signed-off-by: TAKANO Mitsuhiro Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201235504.2534= 857-1-takano32@gmail.com?part=3D1