1. 12 6月, 2018 1 次提交
    • A
      riscv/ftrace: Export _mcount when DYNAMIC_FTRACE isn't set · 1dd98522
      Alan Kao 提交于
      The EXPORT_SYMBOL(_mcount) for RISC-V ended up inside a
      CONFIG_DYNAMIC_FTRACE ifdef.  If you enable modules without enabling
      CONFIG_DYNAMIC_FTRACE then you'll get a build error without this patch
      because the modules won't be able to find _mcount.
      
      The new behavior is to export _mcount whenever CONFIG_FUNCTION_TRACER is
      defined.  This matches what every other architecture is doing.
      Signed-off-by: NAlan Kao <alankao@andestech.com>
      Cc: Greentime Hu <greentime@andestech.com>
      Cc: Zong Li <zong@andestech.com>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      1dd98522
  2. 03 4月, 2018 1 次提交
    • A
      riscv/ftrace: Add dynamic function tracer support · c15ac4fd
      Alan Kao 提交于
      We now have dynamic ftrace with the following added items:
      
      * ftrace_make_call, ftrace_make_nop (in kernel/ftrace.c)
        The two functions turn each recorded call site of filtered functions
        into a call to ftrace_caller or nops
      
      * ftracce_update_ftrace_func (in kernel/ftrace.c)
        turns the nops at ftrace_call into a call to a generic entry for
        function tracers.
      
      * ftrace_caller (in kernel/mcount-dyn.S)
        The entry where each _mcount call sites calls to once they are
        filtered to be traced.
      
      Also, this patch fixes the semantic problems in mcount.S, which will be
      treated as only a reference implementation once we have the dynamic
      ftrace.
      
      Cc: Greentime Hu <greentime@andestech.com>
      Signed-off-by: NAlan Kao <alankao@andestech.com>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      c15ac4fd
  3. 31 1月, 2018 1 次提交
    • A
      riscv/ftrace: Add basic support · 10626c32
      Alan Kao 提交于
      This patch contains basic ftrace support for RV64I platform.
      Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph
      tracer (HAVE_FUNCTION_GRAPH_TRACER), and a frame pointer test
      (HAVE_FUNCTION_GRAPH_FP_TEST) are implemented following the
      instructions in Documentation/trace/ftrace-design.txt.
      
      Note that the functions in both ftrace.c and setup.c should not be
      hooked with the compiler's -pg option: to prevent infinite self-
      referencing for the former, and to ignore early setup stuff for the
      latter.
      Signed-off-by: NAlan Kao <alankao@andestech.com>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      10626c32