From: Sahil Siddiq <icegambit91@gmail.com>
To: Linux OpenRISC <linux-openrisc@vger.kernel.org>
Subject: Queries regarding ftrace's implementation for OpenRISC-linux
Date: Sat, 3 May 2025 21:44:54 +0530 [thread overview]
Message-ID: <e9f74ae6-10f3-4585-b727-928bb5749dd9@gmail.com> (raw)
Hi,
I have been looking into implementing ftrace for OpenRISC-linux. Based on what I have
understood from the ftrace design document [1], mcount will have to be implemented in
the kernel for ftrace to work.
While this document is outdated, I did come across an article in the Linux Journal [2]
that explains the use of fentry instead of mcount in the implementation of ftrace. It
states that fentry is a powerful alternative to mcount. To make use of fentry, GCC's
-pg flag needs to be used along with the -mfentry flag. Simply calling -pg results in
mcount being used.
Should it be possible for ftrace to make use of either option (fentry and mcount) when
implementing it for OpenRISC? Or should it only use fentry (or mcount)? mcount still
seems to be used in other architectures (I have only checked MIPS, RISC-V, LoongArch
and ARM so far).
Also, or1k-linux-gcc (version 13.3.0) does not support the -mfentry flag. So, if fentry
is to be supported for OpenRISC, this will also involve changes in GCC and glibc.
Thanks,
Sahil
[1] https://www.kernel.org/doc/html/latest/trace/ftrace-design.html
[2] https://web.archive.org/web/20250215201110/https://www.linuxjournal.com/content/simplifying-function-tracing-modern-gcc
next reply other threads:[~2025-05-03 16:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 16:14 Sahil Siddiq [this message]
2025-05-06 15:03 ` Queries regarding ftrace's implementation for OpenRISC-linux Stafford Horne
2025-05-08 18:40 ` Sahil Siddiq
2025-05-09 18:59 ` Stafford Horne
2025-05-10 8:18 ` Sahil Siddiq
2025-09-09 4:26 ` KProbes " Sahil Siddiq
2025-09-11 9:52 ` Stafford Horne
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=e9f74ae6-10f3-4585-b727-928bb5749dd9@gmail.com \
--to=icegambit91@gmail.com \
--cc=linux-openrisc@vger.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).