aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index b93ecbadad6d..95059f091a24 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -56,17 +56,23 @@ enum trace_type {
56#define F_STRUCT(args...) args 56#define F_STRUCT(args...) args
57 57
58#undef FTRACE_ENTRY 58#undef FTRACE_ENTRY
59#define FTRACE_ENTRY(name, struct_name, id, tstruct, print) \ 59#define FTRACE_ENTRY(name, struct_name, id, tstruct, print, filter) \
60 struct struct_name { \ 60 struct struct_name { \
61 struct trace_entry ent; \ 61 struct trace_entry ent; \
62 tstruct \ 62 tstruct \
63 } 63 }
64 64
65#undef TP_ARGS 65#undef TP_ARGS
66#define TP_ARGS(args...) args 66#define TP_ARGS(args...) args
67 67
68#undef FTRACE_ENTRY_DUP 68#undef FTRACE_ENTRY_DUP
69#define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk) 69#define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk, filter)
70
71#undef FTRACE_ENTRY_REG
72#define FTRACE_ENTRY_REG(name, struct_name, id, tstruct, print, \
73 filter, regfn) \
74 FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \
75 filter)
70 76
71#include "trace_entries.h" 77#include "trace_entries.h"
72 78
@@ -148,6 +154,7 @@ struct trace_array {
148 struct ring_buffer *buffer; 154 struct ring_buffer *buffer;
149 unsigned long entries; 155 unsigned long entries;
150 int cpu; 156 int cpu;
157 int buffer_disabled;
151 cycle_t time_start; 158 cycle_t time_start;
152 struct task_struct *waiter; 159 struct task_struct *waiter;
153 struct trace_array_cpu *data[NR_CPUS]; 160 struct trace_array_cpu *data[NR_CPUS];
@@ -288,6 +295,8 @@ struct tracer {
288/* for function tracing recursion */ 295/* for function tracing recursion */
289#define TRACE_INTERNAL_BIT (1<<11) 296#define TRACE_INTERNAL_BIT (1<<11)
290#define TRACE_GLOBAL_BIT (1<<12) 297#define TRACE_GLOBAL_BIT (1<<12)
298#define TRACE_CONTROL_BIT (1<<13)
299
291/* 300/*
292 * Abuse of the trace_recursion. 301 * Abuse of the trace_recursion.
293 * As we need a way to maintain state if we are tracing the function 302 * As we need a way to maintain state if we are tracing the function
@@ -589,6 +598,8 @@ static inline int ftrace_trace_task(struct task_struct *task)
589static inline int ftrace_is_dead(void) { return 0; } 598static inline int ftrace_is_dead(void) { return 0; }
590#endif 599#endif
591 600
601int ftrace_event_is_function(struct ftrace_event_call *call);
602
592/* 603/*
593 * struct trace_parser - servers for reading the user input separated by spaces 604 * struct trace_parser - servers for reading the user input separated by spaces
594 * @cont: set if the input is not complete - no final space char was found 605 * @cont: set if the input is not complete - no final space char was found
@@ -766,9 +777,7 @@ struct filter_pred {
766 u64 val; 777 u64 val;
767 struct regex regex; 778 struct regex regex;
768 unsigned short *ops; 779 unsigned short *ops;
769#ifdef CONFIG_FTRACE_STARTUP_TEST
770 struct ftrace_event_field *field; 780 struct ftrace_event_field *field;
771#endif
772 int offset; 781 int offset;
773 int not; 782 int not;
774 int op; 783 int op;
@@ -818,12 +827,20 @@ extern const char *__start___trace_bprintk_fmt[];
818extern const char *__stop___trace_bprintk_fmt[]; 827extern const char *__stop___trace_bprintk_fmt[];
819 828
820#undef FTRACE_ENTRY 829#undef FTRACE_ENTRY
821#define FTRACE_ENTRY(call, struct_name, id, tstruct, print) \ 830#define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter) \
822 extern struct ftrace_event_call \ 831 extern struct ftrace_event_call \
823 __attribute__((__aligned__(4))) event_##call; 832 __attribute__((__aligned__(4))) event_##call;
824#undef FTRACE_ENTRY_DUP 833#undef FTRACE_ENTRY_DUP
825#define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print) \ 834#define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print, filter) \
826 FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print)) 835 FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \
836 filter)
827#include "trace_entries.h" 837#include "trace_entries.h"
828 838
839#ifdef CONFIG_FUNCTION_TRACER
840int perf_ftrace_event_register(struct ftrace_event_call *call,
841 enum trace_reg type, void *data);
842#else
843#define perf_ftrace_event_register NULL
844#endif /* CONFIG_FUNCTION_TRACER */
845
829#endif /* _LINUX_KERNEL_TRACE_H */ 846#endif /* _LINUX_KERNEL_TRACE_H */