mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Chen Pei <cp0613@linux.alibaba.com>
Cc: pjw@kernel.org, alex@ghiti.fr, andybnac@gmail.com,
	guoren@kernel.org,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: ftrace: select HAVE_BUILDTIME_MCOUNT_SORT
Date: Fri, 22 May 2026 18:00:16 -0600 (MDT)	[thread overview]
Message-ID: <d6ed1410-ec11-f11b-1066-914ea160e0ba@kernel.org> (raw)
In-Reply-To: <20260409114736.907-1-cp0613@linux.alibaba.com>

On Thu, 9 Apr 2026, cp0613@linux.alibaba.com wrote:

> From: Chen Pei <cp0613@linux.alibaba.com>
> 
> RISC-V already satisfies all prerequisites for build-time mcount sorting:
> the sorttable host tool handles EM_RISCV in its machine-type dispatch, and
> the __mcount_loc section entries are stored as direct virtual addresses in
> the final vmlinux binary, so no relocation processing is required during
> the sort step.
> 
> Select HAVE_BUILDTIME_MCOUNT_SORT so that BUILDTIME_MCOUNT_SORT is
> automatically enabled when DYNAMIC_FTRACE is configured.  This allows
> sorttable to sort the __mcount_loc section at link time, making the
> run-time ftrace initialisation path skip the software sort and reducing
> kernel startup overhead.
> 
> Verified with CONFIG_FTRACE_SORT_STARTUP_TEST=y, which confirms that
> the section produced by the build is already in ascending order:
> 
>   [    0.000000] ftrace section at ffffffff81015a60 sorted properly
> 
> Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>

Thanks, queued for v7.2.


- Paul


      parent reply	other threads:[~2026-05-23  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 11:47 cp0613
2026-04-10  9:17 ` Guo Ren
2026-05-23  0:00 ` Paul Walmsley [this message]

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=d6ed1410-ec11-f11b-1066-914ea160e0ba@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=andybnac@gmail.com \
    --cc=cp0613@linux.alibaba.com \
    --cc=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.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

all inboxes | Powered by JetHome®