• Steven Rostedt's avatar
    ftrace: Add context level recursion bit checking · c29f122c
    Steven Rostedt authored
    Currently for recursion checking in the function tracer, ftrace
    tests a task_struct bit to determine if the function tracer had
    recursed or not. If it has, then it will will return without going
    But this leads to races. If an interrupt came in after the bit
    was set, the functions being traced would see that bit set and
    think that the function tracer recursed on itself, and would return.
    Instead add a bit for each context (normal, softirq, irq and nmi).
    A check of which context the task is in is made before testing the
    associated bit. Now if an interrupt preempts the function tracer
    after the previous context has been set, the interrupt functions
    can still be traced.
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
trace.h 24.5 KB