From: Heiko Carstens <hca@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org,
Mark Rutland <mark.rutland@arm.com>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] arm64: scripts/sorttable: Implement sorting mcount_loc at boot for arm64
Date: Thu, 13 Feb 2025 13:53:02 +0100 [thread overview]
Message-ID: <20250213125302.12012-A-hca@linux.ibm.com> (raw)
In-Reply-To: <20250210142647.083ff456@gandalf.local.home>
On Mon, Feb 10, 2025 at 02:26:47PM -0500, Steven Rostedt wrote:
> For the s390 folks. I cross compiled a s390 and looked at the mcount_loc
> section, and I have no idea how to implement this for that. I wrote a elf
> parser to dump sections based symbols:
>
> https://rostedt.org/code/dump_elf_sym.c
>
> And ran it on the s390 vmlinux:
>
> $ ./dump_elf_sym vmlinux __start_mcount_loc __stop_mcount_loc
> 1801620: .. .. .. .. .. .. .. .. 00 00 00 00 00 11 70 20 ......... .....p
> 1801630: 00 00 00 00 00 11 70 90 00 00 00 00 00 11 70 a0 ......p.. .....p.
> 1801640: 00 00 00 00 00 11 71 10 00 00 00 00 00 11 71 20 ......q.. .....q
> 1801650: 00 00 00 00 00 11 71 90 00 00 00 00 01 7c 70 00 ......q.. ....|p.
> 1801660: 00 00 00 00 01 7c 70 20 00 00 00 00 01 7c 70 40 .....|p . ....|p@
> 1801670: 00 00 00 00 01 7c 70 60 00 00 00 00 01 7c 70 70 .....|p`. ....|pp
> 1801680: 00 00 00 00 01 7c 70 98 00 00 00 00 01 7c 70 c0 .....|p.. ....|p.
> 1801690: 00 00 00 00 01 7c 70 d0 00 00 00 00 01 7c 71 68 .....|p.. ....|qh
> [..]
>
> It looks like addresses in that section...
Those are the addresses of the mcount locations. After looking at
sorttable.c it really looks like that for s390 we can simply select
HAVE_BUILDTIME_MCOUNT_SORT without any further changes.
I just tested it with different compiler options (fentry vs hotpatch),
including selecting FTRACE_SORT_STARTUP_TEST, and as expected everything
works.
I'm going to give it some more testing in our CI - but if nothing breaks a
patch which selects HAVE_BUILDTIME_MCOUNT_SORT for s390 will go upstream
with the next merge window.
next prev parent reply other threads:[~2025-02-13 12:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 19:26 [PATCH] arm64: scripts/sorttable: Implement sorting mcount_loc at boot for arm64 Steven Rostedt
2025-02-11 9:07 ` kernel test robot
2025-02-11 15:46 ` Steven Rostedt
2025-02-13 12:53 ` Heiko Carstens [this message]
2025-02-13 15:09 ` Heiko Carstens
2025-02-13 15:14 ` Steven Rostedt
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=20250213125302.12012-A-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=gor@linux.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rostedt@goodmis.org \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).