On Mon, Oct 9, 2023 at 10:14 AM Yajun Deng <yajun.deng@xxxxxxxxx> wrote:
The function was fine, you do not need anything like push or pop.
On 2023/10/9 15:53, Eric Dumazet wrote:
On Mon, Oct 9, 2023 at 5:07 AM Yajun Deng <yajun.deng@xxxxxxxxx> wrote:
'this_cpu_read + this_cpu_write' and 'pr_info + this_cpu_inc' will makeI do not think you made sure netdev_core_stats_inc() was never inlined.
the trace work well.
They all have 'pop' instructions in them. This may be the key to making
the trace work well.
Hi all,
I need your help on percpu and ftrace.
Adding more code in it is simply changing how the compiler decides to
inline or not.
Yes, you are right. It needs to add the 'noinline' prefix. The
disassembly code will have 'pop'
instruction.
The only needed stuff was the call __fentry__.
The fact that the function was inlined for some invocations was the
issue, because the trace point
is only planted in the out of line function.