ftrace.h 868 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __ASM_SH_FTRACE_H
  2. #define __ASM_SH_FTRACE_H
  3. #ifdef CONFIG_FUNCTION_TRACER
  4. #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
  5. #ifndef __ASSEMBLY__
  6. extern void mcount(void);
  7. #define MCOUNT_ADDR ((long)(mcount))
  8. #ifdef CONFIG_DYNAMIC_FTRACE
  9. #define CALL_ADDR ((long)(ftrace_call))
  10. #define STUB_ADDR ((long)(ftrace_stub))
  11. #define GRAPH_ADDR ((long)(ftrace_graph_call))
  12. #define CALLER_ADDR ((long)(ftrace_caller))
  13. #define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALL_ADDR) - 4)
  14. #define GRAPH_INSN_OFFSET ((CALLER_ADDR - GRAPH_ADDR) - 4)
  15. struct dyn_arch_ftrace {
  16. /* No extra data needed on sh */
  17. };
  18. #endif /* CONFIG_DYNAMIC_FTRACE */
  19. static inline unsigned long ftrace_call_adjust(unsigned long addr)
  20. {
  21. /* 'addr' is the memory table address. */
  22. return addr;
  23. }
  24. #endif /* __ASSEMBLY__ */
  25. #endif /* CONFIG_FUNCTION_TRACER */
  26. #endif /* __ASM_SH_FTRACE_H */