diff options
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r-- | kernel/trace/trace_syscalls.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index a657cefbb137..eb769f270291 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -438,6 +438,7 @@ static void perf_syscall_enter(struct pt_regs *regs, long id) | |||
438 | { | 438 | { |
439 | struct syscall_metadata *sys_data; | 439 | struct syscall_metadata *sys_data; |
440 | struct syscall_trace_enter *rec; | 440 | struct syscall_trace_enter *rec; |
441 | struct hlist_head *head; | ||
441 | int syscall_nr; | 442 | int syscall_nr; |
442 | int rctx; | 443 | int rctx; |
443 | int size; | 444 | int size; |
@@ -467,8 +468,9 @@ static void perf_syscall_enter(struct pt_regs *regs, long id) | |||
467 | rec->nr = syscall_nr; | 468 | rec->nr = syscall_nr; |
468 | syscall_get_arguments(current, regs, 0, sys_data->nb_args, | 469 | syscall_get_arguments(current, regs, 0, sys_data->nb_args, |
469 | (unsigned long *)&rec->args); | 470 | (unsigned long *)&rec->args); |
470 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, | 471 | |
471 | sys_data->enter_event->perf_data); | 472 | head = per_cpu_ptr(sys_data->enter_event->perf_events, smp_processor_id()); |
473 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head); | ||
472 | } | 474 | } |
473 | 475 | ||
474 | int perf_sysenter_enable(struct ftrace_event_call *call) | 476 | int perf_sysenter_enable(struct ftrace_event_call *call) |
@@ -510,6 +512,7 @@ static void perf_syscall_exit(struct pt_regs *regs, long ret) | |||
510 | { | 512 | { |
511 | struct syscall_metadata *sys_data; | 513 | struct syscall_metadata *sys_data; |
512 | struct syscall_trace_exit *rec; | 514 | struct syscall_trace_exit *rec; |
515 | struct hlist_head *head; | ||
513 | int syscall_nr; | 516 | int syscall_nr; |
514 | int rctx; | 517 | int rctx; |
515 | int size; | 518 | int size; |
@@ -542,8 +545,8 @@ static void perf_syscall_exit(struct pt_regs *regs, long ret) | |||
542 | rec->nr = syscall_nr; | 545 | rec->nr = syscall_nr; |
543 | rec->ret = syscall_get_return_value(current, regs); | 546 | rec->ret = syscall_get_return_value(current, regs); |
544 | 547 | ||
545 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, | 548 | head = per_cpu_ptr(sys_data->exit_event->perf_events, smp_processor_id()); |
546 | sys_data->exit_event->perf_data); | 549 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head); |
547 | } | 550 | } |
548 | 551 | ||
549 | int perf_sysexit_enable(struct ftrace_event_call *call) | 552 | int perf_sysexit_enable(struct ftrace_event_call *call) |