On 10/29/24 12:12 PM, Thomas Gleixner wrote:
I doubt that it works as you want it to work. + inline notrace __attribute((__section__(".noinstr.text"))) \ So this explicitely puts the inline into the .noinstr.text section, which means when it is used in .text the compiler will generate an out-of line function in the .noinstr.text section and insert a call into the usage site. That's independent of the size of the inline.
Oh, that's interesting. IIRC I had seen regular (.text) inline functions get inlined into .noinstr.text callers. I assume the difference is that here the section is marked explicitly rather than being implicit?
In any case, I guess we could just mark these functions as plain noinstr. (Unless there happens to be some other way to indicate to the compiler to place any non-inlined copy of the function in .noinstr.text but still allow inlining into .text if it makes sense optimization-wise.)
Thanks, Junaid