[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191104140020.GI45140@lakrids.cambridge.arm.com>
Date: Mon, 4 Nov 2019 14:00:21 +0000
From: Mark Rutland <mark.rutland@....com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Torsten Duwe <duwe@...e.de>, linux-arm-kernel@...ts.infradead.org,
Jessica Yu <jeyu@...nel.org>, Helge Deller <deller@....de>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
linux-kernel@...r.kernel.org, amit.kachhap@....com,
catalin.marinas@....com, james.morse@....com, jpoimboe@...hat.com,
jthierry@...hat.com, linux-parisc@...r.kernel.org,
mingo@...hat.com, peterz@...radead.org, svens@...ckframe.org,
takahiro.akashi@...aro.org, will@...nel.org
Subject: Re: [PATCHv2 2/8] module/ftrace: handle patchable-function-entry
On Mon, Nov 04, 2019 at 08:28:10AM -0500, Steven Rostedt wrote:
> On Thu, 31 Oct 2019 13:00:22 +0000
> Mark Rutland <mark.rutland@....com> wrote:
>
> > Sure. I've folded the above into this patch, and pushed out an updated branch:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/ftrace-with-regs
>
> Just to keep this change in lore, can you at a minimum reply to this
> patch's thread with the new update?
The new change is below (with all else unchanged). I can send a v3 of
the series if you want the whole patch?
Thanks,
Mark.
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index dae64600ccbf..a9c4e4721434 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -110,17 +110,17 @@
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
-#ifdef CC_USING_PATCHABLE_FUNCTION_ENTRY
-#define MCOUNT_REC() . = ALIGN(8); \
- __start_mcount_loc = .; \
- KEEP(*(__patchable_function_entries)) \
- __stop_mcount_loc = .;
-#else
+/*
+ * The ftrace call sites are logged to a section whose name depends on the
+ * compiler option used. A given kernel image will only use one, AKA
+ * FTRACE_CALLSITE_SECTION. We capture all of them here to avoid header
+ * dependencies for FTRACE_CALLSITE_SECTION's definition.
+ */
#define MCOUNT_REC() . = ALIGN(8); \
__start_mcount_loc = .; \
KEEP(*(__mcount_loc)) \
+ KEEP(*(__patchable_function_entries)) \
__stop_mcount_loc = .;
-#endif
#else
#define MCOUNT_REC()
#endif
Powered by blists - more mailing lists