mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: "mark.barnett@arm.com" <mark.barnett@arm.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	namhyung@kernel.org, irogers@google.com, ben.gainey@arm.com,
	deepak.surti@arm.com, ak@linux.intel.com, will@kernel.org,
	james.clark@arm.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	adrian.hunter@intel.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 5/5] perf: Record sample last_period before updating
Date: Tue, 21 Jan 2025 17:22:02 +0000	[thread overview]
Message-ID: <20250121172202.GB416913@e132581.arm.com> (raw)
In-Reply-To: <20250106120156.227273-6-mark.barnett@arm.com>

On Mon, Jan 06, 2025 at 12:01:56PM +0000, mark.barnett@arm.com wrote:
> From: Mark Barnett <mark.barnett@arm.com>
> 
> This change alters the PowerPC and x86 driver implementations to record
> the last sample period before the event is updated for the next period.
> 
> A common pattern in PMU driver implementations is to have a
> "*_event_set_period" function which takes care of updating the various
> period-related fields in a perf_event structure. In most cases, the
> drivers choose to call this function after initializing a sample data
> structure with perf_sample_data_init. The x86 and PowerPC drivers
> deviate from this, choosing to update the period before initializing the
> sample data. When using an event with an alternate sample period, this
> causes an incorrect period to be written to the sample data that gets
> reported to userspace.

I found conflict when I applied this patch on linux-next [1], with the
commit below:

commit faac6f105ef169e2e5678c14e1ffebf2a7d780b6
Author: Yabin Cui <yabinc@google.com>
Date:   Wed May 15 12:36:09 2024 -0700

    perf/core: Check sample_type in perf_sample_save_brstack

    Check sample_type in perf_sample_save_brstack() to prevent
    saving branch stack data when it isn't required.

    Suggested-by: Namhyung Kim <namhyung@kernel.org>
    Signed-off-by: Yabin Cui <yabinc@google.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Reviewed-by: Ian Rogers <irogers@google.com>
    Acked-by: Namhyung Kim <namhyung@kernel.org>
    Link: https://lore.kernel.org/r/20240515193610.2350456-4-yabinc@google.com


Please consider to rebase the patch to fix conflict in next spin.

Thanks,
Leo

[1] git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

  reply	other threads:[~2025-01-21 17:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 12:01 [PATCH v2 0/5] A mechanism for efficient support for per-function metrics mark.barnett
2025-01-06 12:01 ` [PATCH v2 1/5] perf: Allow periodic events to alternate between two sample periods mark.barnett
2025-01-21 13:01   ` Leo Yan
2025-03-07 20:28     ` Mark Barnett
2025-03-10 10:55       ` Leo Yan
2025-01-31 18:44   ` Rob Herring
2025-02-07 19:18     ` Mark Barnett
2025-01-06 12:01 ` [PATCH v2 2/5] perf: Allow adding fixed random jitter to the alternate sampling period mark.barnett
2025-01-06 12:01 ` [PATCH v2 3/5] tools/perf: Modify event parser to support alt-period term mark.barnett
2025-01-06 12:01 ` [PATCH v2 4/5] tools/perf: Modify event parser to support alt-period-jitter term mark.barnett
2025-01-06 12:01 ` [PATCH v2 5/5] perf: Record sample last_period before updating mark.barnett
2025-01-21 17:22   ` Leo Yan [this message]
2025-01-22  5:03   ` kernel test robot
2025-01-22 16:47 ` [PATCH v2 0/5] A mechanism for efficient support for per-function metrics James Clark
2025-02-07 19:23   ` Mark Barnett

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=20250121172202.GB416913@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ben.gainey@arm.com \
    --cc=deepak.surti@arm.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.barnett@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®