aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/ftrace.h33
-rw-r--r--include/trace/syscall.h15
2 files changed, 48 insertions, 0 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 0fd06fef9fac..26b4f2e13275 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -44,6 +44,12 @@
44#undef __field_ext 44#undef __field_ext
45#define __field_ext(type, item, filter_type) type item; 45#define __field_ext(type, item, filter_type) type item;
46 46
47#undef __field_struct
48#define __field_struct(type, item) type item;
49
50#undef __field_struct_ext
51#define __field_struct_ext(type, item, filter_type) type item;
52
47#undef __array 53#undef __array
48#define __array(type, item, len) type item[len]; 54#define __array(type, item, len) type item[len];
49 55
@@ -122,6 +128,12 @@
122#undef __field_ext 128#undef __field_ext
123#define __field_ext(type, item, filter_type) 129#define __field_ext(type, item, filter_type)
124 130
131#undef __field_struct
132#define __field_struct(type, item)
133
134#undef __field_struct_ext
135#define __field_struct_ext(type, item, filter_type)
136
125#undef __array 137#undef __array
126#define __array(type, item, len) 138#define __array(type, item, len)
127 139
@@ -315,9 +327,21 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \
315 if (ret) \ 327 if (ret) \
316 return ret; 328 return ret;
317 329
330#undef __field_struct_ext
331#define __field_struct_ext(type, item, filter_type) \
332 ret = trace_define_field(event_call, #type, #item, \
333 offsetof(typeof(field), item), \
334 sizeof(field.item), \
335 0, filter_type); \
336 if (ret) \
337 return ret;
338
318#undef __field 339#undef __field
319#define __field(type, item) __field_ext(type, item, FILTER_OTHER) 340#define __field(type, item) __field_ext(type, item, FILTER_OTHER)
320 341
342#undef __field_struct
343#define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER)
344
321#undef __array 345#undef __array
322#define __array(type, item, len) \ 346#define __array(type, item, len) \
323 do { \ 347 do { \
@@ -379,6 +403,12 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
379#undef __field_ext 403#undef __field_ext
380#define __field_ext(type, item, filter_type) 404#define __field_ext(type, item, filter_type)
381 405
406#undef __field_struct
407#define __field_struct(type, item)
408
409#undef __field_struct_ext
410#define __field_struct_ext(type, item, filter_type)
411
382#undef __array 412#undef __array
383#define __array(type, item, len) 413#define __array(type, item, len)
384 414
@@ -550,6 +580,9 @@ static inline notrace int ftrace_get_offsets_##call( \
550#undef __field 580#undef __field
551#define __field(type, item) 581#define __field(type, item)
552 582
583#undef __field_struct
584#define __field_struct(type, item)
585
553#undef __array 586#undef __array
554#define __array(type, item, len) 587#define __array(type, item, len)
555 588
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index fed853f3d7aa..9674145e2f6a 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -4,6 +4,7 @@
4#include <linux/tracepoint.h> 4#include <linux/tracepoint.h>
5#include <linux/unistd.h> 5#include <linux/unistd.h>
6#include <linux/ftrace_event.h> 6#include <linux/ftrace_event.h>
7#include <linux/thread_info.h>
7 8
8#include <asm/ptrace.h> 9#include <asm/ptrace.h>
9 10
@@ -32,4 +33,18 @@ struct syscall_metadata {
32 struct ftrace_event_call *exit_event; 33 struct ftrace_event_call *exit_event;
33}; 34};
34 35
36#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
37static inline void syscall_tracepoint_update(struct task_struct *p)
38{
39 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
40 set_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
41 else
42 clear_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
43}
44#else
45static inline void syscall_tracepoint_update(struct task_struct *p)
46{
47}
48#endif
49
35#endif /* _TRACE_SYSCALL_H */ 50#endif /* _TRACE_SYSCALL_H */