diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b6211d604131..d6059a493e7f 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -866,10 +866,6 @@ struct ring_buffer_event *trace_buffer_lock_reserve(struct trace_array *tr, | |||
866 | 866 | ||
867 | return event; | 867 | return event; |
868 | } | 868 | } |
869 | static void ftrace_trace_stack(struct trace_array *tr, | ||
870 | unsigned long flags, int skip, int pc); | ||
871 | static void ftrace_trace_userstack(struct trace_array *tr, | ||
872 | unsigned long flags, int pc); | ||
873 | 869 | ||
874 | static inline void __trace_buffer_unlock_commit(struct trace_array *tr, | 870 | static inline void __trace_buffer_unlock_commit(struct trace_array *tr, |
875 | struct ring_buffer_event *event, | 871 | struct ring_buffer_event *event, |
@@ -1003,11 +999,11 @@ ftrace(struct trace_array *tr, struct trace_array_cpu *data, | |||
1003 | trace_function(tr, ip, parent_ip, flags, pc); | 999 | trace_function(tr, ip, parent_ip, flags, pc); |
1004 | } | 1000 | } |
1005 | 1001 | ||
1002 | #ifdef CONFIG_STACKTRACE | ||
1006 | static void __ftrace_trace_stack(struct trace_array *tr, | 1003 | static void __ftrace_trace_stack(struct trace_array *tr, |
1007 | unsigned long flags, | 1004 | unsigned long flags, |
1008 | int skip, int pc) | 1005 | int skip, int pc) |
1009 | { | 1006 | { |
1010 | #ifdef CONFIG_STACKTRACE | ||
1011 | struct ftrace_event_call *call = &event_kernel_stack; | 1007 | struct ftrace_event_call *call = &event_kernel_stack; |
1012 | struct ring_buffer_event *event; | 1008 | struct ring_buffer_event *event; |
1013 | struct stack_entry *entry; | 1009 | struct stack_entry *entry; |
@@ -1028,12 +1024,10 @@ static void __ftrace_trace_stack(struct trace_array *tr, | |||
1028 | save_stack_trace(&trace); | 1024 | save_stack_trace(&trace); |
1029 | if (!filter_check_discard(call, entry, tr->buffer, event)) | 1025 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
1030 | ring_buffer_unlock_commit(tr->buffer, event); | 1026 | ring_buffer_unlock_commit(tr->buffer, event); |
1031 | #endif | ||
1032 | } | 1027 | } |
1033 | 1028 | ||
1034 | static void ftrace_trace_stack(struct trace_array *tr, | 1029 | void ftrace_trace_stack(struct trace_array *tr, unsigned long flags, int skip, |
1035 | unsigned long flags, | 1030 | int pc) |
1036 | int skip, int pc) | ||
1037 | { | 1031 | { |
1038 | if (!(trace_flags & TRACE_ITER_STACKTRACE)) | 1032 | if (!(trace_flags & TRACE_ITER_STACKTRACE)) |
1039 | return; | 1033 | return; |
@@ -1041,17 +1035,14 @@ static void ftrace_trace_stack(struct trace_array *tr, | |||
1041 | __ftrace_trace_stack(tr, flags, skip, pc); | 1035 | __ftrace_trace_stack(tr, flags, skip, pc); |
1042 | } | 1036 | } |
1043 | 1037 | ||
1044 | void __trace_stack(struct trace_array *tr, | 1038 | void __trace_stack(struct trace_array *tr, unsigned long flags, int skip, |
1045 | unsigned long flags, | 1039 | int pc) |
1046 | int skip, int pc) | ||
1047 | { | 1040 | { |
1048 | __ftrace_trace_stack(tr, flags, skip, pc); | 1041 | __ftrace_trace_stack(tr, flags, skip, pc); |
1049 | } | 1042 | } |
1050 | 1043 | ||
1051 | static void ftrace_trace_userstack(struct trace_array *tr, | 1044 | void ftrace_trace_userstack(struct trace_array *tr, unsigned long flags, int pc) |
1052 | unsigned long flags, int pc) | ||
1053 | { | 1045 | { |
1054 | #ifdef CONFIG_STACKTRACE | ||
1055 | struct ftrace_event_call *call = &event_user_stack; | 1046 | struct ftrace_event_call *call = &event_user_stack; |
1056 | struct ring_buffer_event *event; | 1047 | struct ring_buffer_event *event; |
1057 | struct userstack_entry *entry; | 1048 | struct userstack_entry *entry; |
@@ -1076,7 +1067,6 @@ static void ftrace_trace_userstack(struct trace_array *tr, | |||
1076 | save_stack_trace_user(&trace); | 1067 | save_stack_trace_user(&trace); |
1077 | if (!filter_check_discard(call, entry, tr->buffer, event)) | 1068 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
1078 | ring_buffer_unlock_commit(tr->buffer, event); | 1069 | ring_buffer_unlock_commit(tr->buffer, event); |
1079 | #endif | ||
1080 | } | 1070 | } |
1081 | 1071 | ||
1082 | #ifdef UNUSED | 1072 | #ifdef UNUSED |
@@ -1086,6 +1076,8 @@ static void __trace_userstack(struct trace_array *tr, unsigned long flags) | |||
1086 | } | 1076 | } |
1087 | #endif /* UNUSED */ | 1077 | #endif /* UNUSED */ |
1088 | 1078 | ||
1079 | #endif /* CONFIG_STACKTRACE */ | ||
1080 | |||
1089 | static void | 1081 | static void |
1090 | ftrace_trace_special(void *__tr, | 1082 | ftrace_trace_special(void *__tr, |
1091 | unsigned long arg1, unsigned long arg2, unsigned long arg3, | 1083 | unsigned long arg1, unsigned long arg2, unsigned long arg3, |