linux-openrisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Queries regarding ftrace's implementation for OpenRISC-linux
@ 2025-05-03 16:14 Sahil Siddiq
  2025-05-06 15:03 ` Stafford Horne
  0 siblings, 1 reply; 7+ messages in thread
From: Sahil Siddiq @ 2025-05-03 16:14 UTC (permalink / raw)
  To: Linux OpenRISC

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-11  9:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-03 16:14 Queries regarding ftrace's implementation for OpenRISC-linux Sahil Siddiq
2025-05-06 15:03 ` 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

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).