• Wu Zhangjin's avatar
    MIPS, Tracing: Clean up prepare_ftrace_return() · 2816e325
    Wu Zhangjin authored
    The old prepare_ftrace_return() for MIPS is confused and have introduced
    some problem. This patch cleans up the names of the arguments, variables
    and related functions.
    
    For MIPS, the 2nd argument of prepare_ftrace_return() is not really the
    'selfpc' described in ftrace-design.txt but instead it is the self
    return address. This did break the compatibility of the generic
    interface but really reduced one unneeded calculation for to get the
    current function name, the parent return address and the self return
    address are enough, no need to tranform the self return address to the
    self address.
    
    But set_graph_function of function graph tracer is an exception, it does
    need the 2nd argument of prepare_ftrace_return() as 'selfpc', for it
    will use 'selfpc' to match user's configuration of function graph
    entries, but in reality, it doesn't need the 'selfpc' but the recorded
    ip address of the mcount calling site in the __mcount_loc section. So,
    the 2nd argument of prepare_ftrace_return() is not important, the real
    requirement is the right recorded ip address should be calculated and
    assign to trace.func, this will be fixed in the next patches.
    Reported-by: default avatarZhiping Zhong <xzhong86@163.com>
    Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
    Cc: Steven Rostedt <srostedt@redhat.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/2007/Signed-off-by: default avatarRalf Baechle <ralf@duck.linux-mips.net>
    2816e325
ftrace.c 7.99 KB