All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gu Bin" <gubin@cmss.chinamobile.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf hist: Fix branch_info index for sample weight
Date: Wed, 04 Nov 2026 09:05:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-196920@kernel.org> (raw)
In-Reply-To: <20261104090229.1870-1-gubin@cmss.chinamobile.com>

> iter_add_next_branch_entry() is called once per branch and uses &bi[i]
> for the hist entry, but reads the weight from bi->flags.cycles (i.e.
> bi[0]) for every branch, so every entry is weighted with the first
> branch's cycle count. This is incorrect when the branch stack contains
> more than one entry with different cycle counts, as the weight of each
> hist entry fails to reflect the cycles of its own branch.
> 
> Use bi[i].flags.cycles, as the surrounding code already does.
> 
> Fixes: 0e332f033a82 ("perf tools: Add support for cycles, weight branch_info field")
> Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104090229.1870-1-gubin@cmss.chinamobile.com?part=1


  reply	other threads:[~2026-11-04  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  9:02 [PATCH] perf hist: Fix branch_info index for sample weight Gu Bin
2026-11-04  9:05 ` sashiko-bot [this message]
2026-11-04  9:22 ` James Clark

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-196920@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=gubin@cmss.chinamobile.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.