Re: [PATCH v8 RESEND 2/9] LoongArch/ftrace: Add recordmcount support

From: Steven Rostedt
Date: Tue Nov 22 2022 - 17:51:20 EST


On Wed, 16 Nov 2022 16:23:31 +0800
Qing Zhang <zhangqing@xxxxxxxxxxx> wrote:

> Recordmcount utility under scripts is run, after compiling each object,
> to find out all the locations of calling _mcount() and put them into
> specific seciton named __mcount_loc.
> Then linker collects all such information into a table in the kernel image
> (between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.
>
> This patch adds loongarch specific definitions to identify such locations.
> On loongarch, only C version is used to build the kernel now that
> CONFIG_HAVE_C_RECORDMCOUNT is on.
>
> Signed-off-by: Qing Zhang <zhangqing@xxxxxxxxxxx>
> ---
> arch/loongarch/Kconfig | 2 ++
> scripts/recordmcount.c | 23 +++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
>

Acked-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve