From: Ingo Molnar <mingo@kernel.org>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: x86@kernel.org, peterz@infradead.org, mingo@redhat.com,
tglx@linutronix.de, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, jolsa@kernel.org, song@kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v2] perf/x86/amd: support capturing LBR from software events
Date: Fri, 29 Mar 2024 08:43:13 +0100 [thread overview]
Message-ID: <ZgZxEcRuYBO3N2WY@gmail.com> (raw)
In-Reply-To: <20240328133359.731818-1-andrii@kernel.org>
* Andrii Nakryiko <andrii@kernel.org> wrote:
> Now that it's possible to capture LBR on AMD CPU from BPF at arbitrary
> point, there is no reason to artificially limit this feature to sampling
> events. So corresponding check is removed. AFAIU, there is no
> correctness implications of doing this (and it was possible to bypass
> this check by just setting perf_event's sample_period to 1 anyways, so
> it doesn't guard all that much).
> diff --git a/arch/x86/events/amd/lbr.c b/arch/x86/events/amd/lbr.c
> index 4a1e600314d5..75920f895d67 100644
> --- a/arch/x86/events/amd/lbr.c
> +++ b/arch/x86/events/amd/lbr.c
> @@ -310,10 +310,6 @@ int amd_pmu_lbr_hw_config(struct perf_event *event)
> {
> int ret = 0;
>
> - /* LBR is not recommended in counting mode */
> - if (!is_sampling_event(event))
> - return -EINVAL;
> -
Could you please split out this change into a separate patch?
Thanks,
Ingo
next prev parent reply other threads:[~2024-03-29 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 13:33 [PATCH v2] perf/x86/amd: support capturing LBR from software events Andrii Nakryiko
2024-03-29 7:43 ` Ingo Molnar [this message]
2024-03-29 9:29 ` Sandipan Das
2024-03-29 16:27 ` Andrii Nakryiko
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=ZgZxEcRuYBO3N2WY@gmail.com \
--to=mingo@kernel.org \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=song@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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 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.