diff options
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 20c96de0aea0..4681f60dac00 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -1341,6 +1341,7 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp, | |||
1341 | struct trace_probe *tp = container_of(kp, struct trace_probe, rp.kp); | 1341 | struct trace_probe *tp = container_of(kp, struct trace_probe, rp.kp); |
1342 | struct ftrace_event_call *call = &tp->call; | 1342 | struct ftrace_event_call *call = &tp->call; |
1343 | struct kprobe_trace_entry_head *entry; | 1343 | struct kprobe_trace_entry_head *entry; |
1344 | struct hlist_head *head; | ||
1344 | u8 *data; | 1345 | u8 *data; |
1345 | int size, __size, i; | 1346 | int size, __size, i; |
1346 | int rctx; | 1347 | int rctx; |
@@ -1361,7 +1362,8 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp, | |||
1361 | for (i = 0; i < tp->nr_args; i++) | 1362 | for (i = 0; i < tp->nr_args; i++) |
1362 | call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset); | 1363 | call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset); |
1363 | 1364 | ||
1364 | perf_trace_buf_submit(entry, size, rctx, entry->ip, 1, regs, call->perf_data); | 1365 | head = per_cpu_ptr(call->perf_events, smp_processor_id()); |
1366 | perf_trace_buf_submit(entry, size, rctx, entry->ip, 1, regs, head); | ||
1365 | } | 1367 | } |
1366 | 1368 | ||
1367 | /* Kretprobe profile handler */ | 1369 | /* Kretprobe profile handler */ |
@@ -1371,6 +1373,7 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri, | |||
1371 | struct trace_probe *tp = container_of(ri->rp, struct trace_probe, rp); | 1373 | struct trace_probe *tp = container_of(ri->rp, struct trace_probe, rp); |
1372 | struct ftrace_event_call *call = &tp->call; | 1374 | struct ftrace_event_call *call = &tp->call; |
1373 | struct kretprobe_trace_entry_head *entry; | 1375 | struct kretprobe_trace_entry_head *entry; |
1376 | struct hlist_head *head; | ||
1374 | u8 *data; | 1377 | u8 *data; |
1375 | int size, __size, i; | 1378 | int size, __size, i; |
1376 | int rctx; | 1379 | int rctx; |
@@ -1392,8 +1395,8 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri, | |||
1392 | for (i = 0; i < tp->nr_args; i++) | 1395 | for (i = 0; i < tp->nr_args; i++) |
1393 | call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset); | 1396 | call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset); |
1394 | 1397 | ||
1395 | perf_trace_buf_submit(entry, size, rctx, entry->ret_ip, 1, | 1398 | head = per_cpu_ptr(call->perf_events, smp_processor_id()); |
1396 | regs, call->perf_data); | 1399 | perf_trace_buf_submit(entry, size, rctx, entry->ret_ip, 1, regs, head); |
1397 | } | 1400 | } |
1398 | 1401 | ||
1399 | static int probe_perf_enable(struct ftrace_event_call *call) | 1402 | static int probe_perf_enable(struct ftrace_event_call *call) |