mtk_ftrace.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2015 MediaTek Inc.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _MTK_FTRACE_H
  14. #define _MTK_FTRACE_H
  15. #include <linux/string.h>
  16. #include <linux/seq_file.h>
  17. #ifdef CONFIG_MTK_KERNEL_MARKER
  18. void trace_begin(char *name);
  19. void trace_counter(char *name, int count);
  20. void trace_end(void);
  21. #else
  22. #define trace_begin(name)
  23. #define trace_counter(name, count)
  24. #define trace_end()
  25. #endif
  26. struct trace_array;
  27. extern bool ring_buffer_expanded;
  28. ssize_t tracing_resize_ring_buffer(struct trace_array *tr,
  29. unsigned long size, int cpu_id);
  30. #ifdef CONFIG_MTK_SCHED_TRACERS
  31. struct trace_buffer;
  32. void print_enabled_events(struct trace_buffer *buf, struct seq_file *m);
  33. void update_buf_size(unsigned long size);
  34. bool boot_ftrace_check(unsigned long trace_en);
  35. #ifdef CONFIG_MTPROF
  36. extern int boot_finish;
  37. #endif
  38. #else
  39. #define print_enabled_events(b, m)
  40. #endif/* CONFIG_TRACING && CONFIG_MTK_SCHED_TRACERS */
  41. #endif