diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-10 19:09:23 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-10 19:09:23 -0400 |
commit | 8f8ffe2485bcaa890800681451d380779cea06af (patch) | |
tree | 1d2ef3a27f1cab9a2b9014f4b75886a96a1ae8db /kernel/trace/trace_kprobe.c | |
parent | 70069577323e6f72b845166724f34b9858134437 (diff) | |
parent | d28daf923ac5e4a0d7cecebae56f3e339189366b (diff) |
Merge commit 'tracing/core' into tracing/kprobes
Conflicts:
kernel/trace/trace_export.c
kernel/trace/trace_kprobe.c
Merge reason: This topic branch lacks an important
build fix in tracing/core:
0dd7b74787eaf7858c6c573353a83c3e2766e674:
tracing: Fix double CPP substitution in TRACE_EVENT_FN
that prevents from multiple tracepoint headers inclusion crashes.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index f4ec3fc87b2d..19a6de63b44b 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -819,6 +819,7 @@ static __kprobes int kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs) | |||
819 | struct trace_probe *tp = container_of(kp, struct trace_probe, kp); | 819 | struct trace_probe *tp = container_of(kp, struct trace_probe, kp); |
820 | struct kprobe_trace_entry *entry; | 820 | struct kprobe_trace_entry *entry; |
821 | struct ring_buffer_event *event; | 821 | struct ring_buffer_event *event; |
822 | struct ring_buffer *buffer; | ||
822 | int size, i, pc; | 823 | int size, i, pc; |
823 | unsigned long irq_flags; | 824 | unsigned long irq_flags; |
824 | struct ftrace_event_call *call = &tp->call; | 825 | struct ftrace_event_call *call = &tp->call; |
@@ -830,7 +831,7 @@ static __kprobes int kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs) | |||
830 | 831 | ||
831 | size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args); | 832 | size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args); |
832 | 833 | ||
833 | event = trace_current_buffer_lock_reserve(call->id, size, | 834 | event = trace_current_buffer_lock_reserve(&buffer, call->id, size, |
834 | irq_flags, pc); | 835 | irq_flags, pc); |
835 | if (!event) | 836 | if (!event) |
836 | return 0; | 837 | return 0; |
@@ -841,8 +842,8 @@ static __kprobes int kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs) | |||
841 | for (i = 0; i < tp->nr_args; i++) | 842 | for (i = 0; i < tp->nr_args; i++) |
842 | entry->args[i] = call_fetch(&tp->args[i], regs); | 843 | entry->args[i] = call_fetch(&tp->args[i], regs); |
843 | 844 | ||
844 | if (!filter_current_check_discard(call, entry, event)) | 845 | if (!filter_current_check_discard(buffer, call, entry, event)) |
845 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); | 846 | trace_nowake_buffer_unlock_commit(buffer, event, irq_flags, pc); |
846 | return 0; | 847 | return 0; |
847 | } | 848 | } |
848 | 849 | ||
@@ -853,6 +854,7 @@ static __kprobes int kretprobe_trace_func(struct kretprobe_instance *ri, | |||
853 | struct trace_probe *tp = container_of(ri->rp, struct trace_probe, rp); | 854 | struct trace_probe *tp = container_of(ri->rp, struct trace_probe, rp); |
854 | struct kretprobe_trace_entry *entry; | 855 | struct kretprobe_trace_entry *entry; |
855 | struct ring_buffer_event *event; | 856 | struct ring_buffer_event *event; |
857 | struct ring_buffer *buffer; | ||
856 | int size, i, pc; | 858 | int size, i, pc; |
857 | unsigned long irq_flags; | 859 | unsigned long irq_flags; |
858 | struct ftrace_event_call *call = &tp->call; | 860 | struct ftrace_event_call *call = &tp->call; |
@@ -862,7 +864,7 @@ static __kprobes int kretprobe_trace_func(struct kretprobe_instance *ri, | |||
862 | 864 | ||
863 | size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args); | 865 | size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args); |
864 | 866 | ||
865 | event = trace_current_buffer_lock_reserve(call->id, size, | 867 | event = trace_current_buffer_lock_reserve(&buffer, call->id, size, |
866 | irq_flags, pc); | 868 | irq_flags, pc); |
867 | if (!event) | 869 | if (!event) |
868 | return 0; | 870 | return 0; |
@@ -874,8 +876,8 @@ static __kprobes int kretprobe_trace_func(struct kretprobe_instance *ri, | |||
874 | for (i = 0; i < tp->nr_args; i++) | 876 | for (i = 0; i < tp->nr_args; i++) |
875 | entry->args[i] = call_fetch(&tp->args[i], regs); | 877 | entry->args[i] = call_fetch(&tp->args[i], regs); |
876 | 878 | ||
877 | if (!filter_current_check_discard(call, entry, event)) | 879 | if (!filter_current_check_discard(buffer, call, entry, event)) |
878 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); | 880 | trace_nowake_buffer_unlock_commit(buffer, event, irq_flags, pc); |
879 | 881 | ||
880 | return 0; | 882 | return 0; |
881 | } | 883 | } |
@@ -964,7 +966,7 @@ static void probe_event_disable(struct ftrace_event_call *call) | |||
964 | static int probe_event_raw_init(struct ftrace_event_call *event_call) | 966 | static int probe_event_raw_init(struct ftrace_event_call *event_call) |
965 | { | 967 | { |
966 | INIT_LIST_HEAD(&event_call->fields); | 968 | INIT_LIST_HEAD(&event_call->fields); |
967 | init_preds(event_call); | 969 | |
968 | return 0; | 970 | return 0; |
969 | } | 971 | } |
970 | 972 | ||