From: Mark Rutland <mark.rutland@arm•com>
To: Colton Lewis <coltonlewis@google•com>
Cc: kvm@vger•kernel.org, Oliver Upton <oliver.upton@linux•dev>,
Sean Christopherson <seanjc@google•com>,
Peter Zijlstra <peterz@infradead•org>,
Ingo Molnar <mingo@redhat•com>,
Arnaldo Carvalho de Melo <acme@kernel•org>,
Namhyung Kim <namhyung@kernel•org>,
Alexander Shishkin <alexander.shishkin@linux•intel.com>,
Jiri Olsa <jolsa@kernel•org>, Ian Rogers <irogers@google•com>,
Adrian Hunter <adrian.hunter@intel•com>,
Kan Liang <kan.liang@linux•intel.com>,
Will Deacon <will@kernel•org>,
Russell King <linux@armlinux•org.uk>,
Catalin Marinas <catalin.marinas@arm•com>,
Michael Ellerman <mpe@ellerman•id.au>,
Nicholas Piggin <npiggin@gmail•com>,
Christophe Leroy <christophe.leroy@csgroup•eu>,
Naveen N Rao <naveen@kernel•org>,
Heiko Carstens <hca@linux•ibm.com>,
Vasily Gorbik <gor@linux•ibm.com>,
Alexander Gordeev <agordeev@linux•ibm.com>,
Christian Borntraeger <borntraeger@linux•ibm.com>,
Sven Schnelle <svens@linux•ibm.com>,
Thomas Gleixner <tglx@linutronix•de>,
Borislav Petkov <bp@alien8•de>,
Dave Hansen <dave.hansen@linux•intel.com>,
x86@kernel•org, "H . Peter Anvin" <hpa@zytor•com>,
linux-perf-users@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-arm-kernel@lists•infradead.org,
linuxppc-dev@lists•ozlabs.org, linux-s390@vger•kernel.org
Subject: Re: [PATCH 1/5] arm: perf: Drop unused functions
Date: Thu, 5 Sep 2024 11:25:10 +0100 [thread overview]
Message-ID: <ZtmHBuggqUr3ncw6@J2N7QTR9R3> (raw)
In-Reply-To: <20240904204133.1442132-2-coltonlewis@google.com>
On Wed, Sep 04, 2024 at 08:41:29PM +0000, Colton Lewis wrote:
> perf_instruction_pointer() and perf_misc_flags() aren't used anywhere
> in this particular perf implementation. Drop them.
I think it'd be better to say that arch/arm's implementation of these is
equivalent to the generic versions in include/linux/perf_event.h, and so
arch/arm doesn't need to provide its own versions. It doesn't matter if
arch/arm uses them itself since they're being provided for the core perf
code.
With words to that effect:
Acked-by: Mark Rutland <mark.rutland@arm•com>
Mark.
>
> Signed-off-by: Colton Lewis <coltonlewis@google•com>
> ---
> arch/arm/include/asm/perf_event.h | 7 -------
> arch/arm/kernel/perf_callchain.c | 17 -----------------
> 2 files changed, 24 deletions(-)
>
> diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h
> index bdbc1e590891..c08f16f2e243 100644
> --- a/arch/arm/include/asm/perf_event.h
> +++ b/arch/arm/include/asm/perf_event.h
> @@ -8,13 +8,6 @@
> #ifndef __ARM_PERF_EVENT_H__
> #define __ARM_PERF_EVENT_H__
>
> -#ifdef CONFIG_PERF_EVENTS
> -struct pt_regs;
> -extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
> -extern unsigned long perf_misc_flags(struct pt_regs *regs);
> -#define perf_misc_flags(regs) perf_misc_flags(regs)
> -#endif
> -
> #define perf_arch_fetch_caller_regs(regs, __ip) { \
> (regs)->ARM_pc = (__ip); \
> frame_pointer((regs)) = (unsigned long) __builtin_frame_address(0); \
> diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c
> index 1d230ac9d0eb..a2601b1ef318 100644
> --- a/arch/arm/kernel/perf_callchain.c
> +++ b/arch/arm/kernel/perf_callchain.c
> @@ -96,20 +96,3 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
> arm_get_current_stackframe(regs, &fr);
> walk_stackframe(&fr, callchain_trace, entry);
> }
> -
> -unsigned long perf_instruction_pointer(struct pt_regs *regs)
> -{
> - return instruction_pointer(regs);
> -}
> -
> -unsigned long perf_misc_flags(struct pt_regs *regs)
> -{
> - int misc = 0;
> -
> - if (user_mode(regs))
> - misc |= PERF_RECORD_MISC_USER;
> - else
> - misc |= PERF_RECORD_MISC_KERNEL;
> -
> - return misc;
> -}
> --
> 2.46.0.469.g59c65b2a67-goog
>
next prev parent reply other threads:[~2024-09-05 10:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 20:41 [PATCH 0/5] Correct perf sampling with guest VMs Colton Lewis
2024-09-04 20:41 ` [PATCH 1/5] arm: perf: Drop unused functions Colton Lewis
2024-09-05 10:25 ` Mark Rutland [this message]
2024-09-11 17:24 ` Colton Lewis
2024-09-04 20:41 ` [PATCH 2/5] perf: Hoist perf_instruction_pointer() and perf_misc_flags() Colton Lewis
2024-09-05 9:46 ` Ingo Molnar
2024-09-11 22:01 ` Colton Lewis
2024-09-04 20:41 ` [PATCH 3/5] powerpc: perf: Use perf_arch_instruction_pointer() Colton Lewis
2024-09-04 20:41 ` [PATCH 4/5] x86: perf: Refactor misc flag assignments Colton Lewis
2024-09-05 9:22 ` Ingo Molnar
2024-09-11 22:05 ` Colton Lewis
2024-09-04 20:41 ` [PATCH 5/5] perf: Correct perf sampling with guest VMs Colton Lewis
2024-09-05 10:55 ` Mark Rutland
2024-09-11 17:42 ` Colton Lewis
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=ZtmHBuggqUr3ncw6@J2N7QTR9R3 \
--to=mark.rutland@arm$(echo .)com \
--cc=acme@kernel$(echo .)org \
--cc=adrian.hunter@intel$(echo .)com \
--cc=agordeev@linux$(echo .)ibm.com \
--cc=alexander.shishkin@linux$(echo .)intel.com \
--cc=borntraeger@linux$(echo .)ibm.com \
--cc=bp@alien8$(echo .)de \
--cc=catalin.marinas@arm$(echo .)com \
--cc=christophe.leroy@csgroup$(echo .)eu \
--cc=coltonlewis@google$(echo .)com \
--cc=dave.hansen@linux$(echo .)intel.com \
--cc=gor@linux$(echo .)ibm.com \
--cc=hca@linux$(echo .)ibm.com \
--cc=hpa@zytor$(echo .)com \
--cc=irogers@google$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kan.liang@linux$(echo .)intel.com \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-perf-users@vger$(echo .)kernel.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@redhat$(echo .)com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=namhyung@kernel$(echo .)org \
--cc=naveen@kernel$(echo .)org \
--cc=npiggin@gmail$(echo .)com \
--cc=oliver.upton@linux$(echo .)dev \
--cc=peterz@infradead$(echo .)org \
--cc=seanjc@google$(echo .)com \
--cc=svens@linux$(echo .)ibm.com \
--cc=tglx@linutronix$(echo .)de \
--cc=will@kernel$(echo .)org \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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