[PATCH V2] trace: adjust code layout in get_recursion_context

2017-08-22 Thread Jesper Dangaard Brouer
In an XDP redirect applications using tracepoint xdp:xdp_redirect to diagnose TX overrun, I noticed perf_swevent_get_recursion_context() was consuming 2% CPU. This was reduced to 1.85% with this simple change. Looking at the annotated asm code, it was clear that the unlikely case in_nmi() test

[PATCH V2] trace: adjust code layout in get_recursion_context

2017-08-22 Thread Jesper Dangaard Brouer
In an XDP redirect applications using tracepoint xdp:xdp_redirect to diagnose TX overrun, I noticed perf_swevent_get_recursion_context() was consuming 2% CPU. This was reduced to 1.85% with this simple change. Looking at the annotated asm code, it was clear that the unlikely case in_nmi() test