Linux-perf-users Archive mirror
 help / color / mirror / Atom feed
From: Yabin Cui <yabinc@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	 bpf@vger.kernel.org
Subject: Re: [PATCH v4 3/3] perf/core: Check sample_type in perf_sample_save_brstack
Date: Wed, 15 May 2024 10:47:11 -0700	[thread overview]
Message-ID: <CALJ9ZPOr7Jg8Vic9Ap5+jYqJVaLeV3DEJm3dAGBCLB9DL5EusQ@mail.gmail.com> (raw)
In-Reply-To: <20240515085840.GD40213@noisy.programming.kicks-ass.net>

On Wed, May 15, 2024 at 1:58 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Fri, May 10, 2024 at 02:29:58PM -0700, Namhyung Kim wrote:
> > On Fri, May 10, 2024 at 12:14 PM Yabin Cui <yabinc@google.com> wrote:
> > >
> > > 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>
> >
> > It seems powerpc has the similar bug, then you need this:
> >
> > Fixes: eb55b455ef9c ("perf/core: Add perf_sample_save_brstack() helper")
>
> Is this really a bug? AFAICT it just does unneeded work, no?

It's not a bug. As I replied to Namhyuang, the powerpc code checks
sample_type before calling perf_sample_save_brstack().

  reply	other threads:[~2024-05-15 17:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 19:14 [PATCH v4 0/3] perf/core: Check sample_type in sample data saving helper functions Yabin Cui
2024-05-10 19:14 ` [PATCH v4 1/3] perf/core: Save raw sample data conditionally based on sample type Yabin Cui
2024-05-15  8:57   ` Peter Zijlstra
2024-05-15 17:39     ` Yabin Cui
2024-05-10 19:14 ` [PATCH v4 2/3] perf/core: Check sample_type in perf_sample_save_callchain Yabin Cui
2024-05-10 19:14 ` [PATCH v4 3/3] perf/core: Check sample_type in perf_sample_save_brstack Yabin Cui
2024-05-10 21:29   ` Namhyung Kim
2024-05-13 18:31     ` Yabin Cui
2024-05-13 20:39       ` Namhyung Kim
2024-05-15  8:58     ` Peter Zijlstra
2024-05-15 17:47       ` Yabin Cui [this message]
2024-05-10 19:30 ` [PATCH v4 0/3] perf/core: Check sample_type in sample data saving helper functions Ian Rogers
2024-05-10 21:26 ` Namhyung Kim

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=CALJ9ZPOr7Jg8Vic9Ap5+jYqJVaLeV3DEJm3dAGBCLB9DL5EusQ@mail.gmail.com \
    --to=yabinc@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).