Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "TAKANO Mitsuhiro" <takano32@gmail.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v7] perf stat: Refuse a group mixing tool and kernel events
Date: Wed, 25 Nov 2026 13:56:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-233510@kernel.org> (raw)
In-Reply-To: <20261125133854.2180695-1-takano32@gmail.com>

> A tool event has no kernel counterpart: user_time and system_time read
> /proc/stat, or /proc/<pid>/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.
> 
> The parser splits it from another software PMU's event, such as cpu-clock,
> and evlist__check_cpu_maps() removes members whose CPUs do not match the
> leader under -a or -C.  What is left is a group that cannot be counted.
> 
> 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
> descriptor, so the members got -2 and failed with EINVAL, "broken group
> leader" appearing only in the debug log.  A DEBUG=1 build asserted in the
> [ ... ]
> Link: https://lore.kernel.org/all/awC_aZXD5FBGu4mO@google.com/
> Link: https://lore.kernel.org/all/awTXdgY38s2bijW5@google.com/
> Cc: Ian Rogers <irogers@google.com>
> Link: https://lore.kernel.org/all/20261123071913.653315-7-irogers@google.com/
> Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125133854.2180695-1-takano32@gmail.com?part=1

      reply	other threads:[~2026-11-25 13:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  6:04 [PATCH v2] perf stat: Count kernel events in a group led by a tool event Hang Zhengyang via B4 Relay
2026-11-11  6:18 ` sashiko-bot
2026-11-11 11:06 ` [PATCH v3] " TAKANO Mitsuhiro
2026-11-11 11:33   ` sashiko-bot
2026-11-12  3:49     ` Hang Zhengyang
2026-11-19  8:06   ` Namhyung Kim
2026-11-19 10:08     ` TAKANO Mitsuhiro
2026-11-20 21:45       ` Namhyung Kim
2026-11-22  8:59   ` [PATCH v4] perf stat: Refuse a group mixing tool and kernel events TAKANO Mitsuhiro
2026-11-22  9:22     ` sashiko-bot
2026-11-24 13:56     ` [PATCH v5] " TAKANO Mitsuhiro
2026-11-24 14:18       ` sashiko-bot
2026-11-25  1:38       ` [PATCH v6] " TAKANO Mitsuhiro
2026-11-25  2:17         ` sashiko-bot
2026-11-25 13:38         ` [PATCH v7] " TAKANO Mitsuhiro
2026-11-25 13:56           ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-233510@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=takano32@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox