[clang] [llvm] Support -mnop-mcount and -mrecord-mcount on x86_64 elf targets. (PR #184641)
Paul Murphy via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 27 07:32:52 PDT 2026
pmur wrote:
> How does this differ from the `"patchable-function-entry"` attribute? I believe that one has good cross target support for inserting function entry nops on at least X86, AArch64, PowerPC, RISCV, LoongArch and SystemZ.
I suppose fentry is a more specialized variant. Interestingly, the x86-64 kernel uses both. It seems to be a crude way to separate bpf and ftrace usage of patchable entries.
Of minor note, the gcc x86-64 windows targets default to using fentry over mcount when using `-pg`.
https://github.com/llvm/llvm-project/pull/184641
More information about the cfe-commits
mailing list