aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r--kernel/trace/trace_syscalls.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 9eff1a4b49b9..a657cefbb137 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -438,7 +438,6 @@ 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 unsigned long flags;
442 int syscall_nr; 441 int syscall_nr;
443 int rctx; 442 int rctx;
444 int size; 443 int size;
@@ -461,14 +460,14 @@ static void perf_syscall_enter(struct pt_regs *regs, long id)
461 return; 460 return;
462 461
463 rec = (struct syscall_trace_enter *)perf_trace_buf_prepare(size, 462 rec = (struct syscall_trace_enter *)perf_trace_buf_prepare(size,
464 sys_data->enter_event->id, &rctx, &flags); 463 sys_data->enter_event->id, regs, &rctx);
465 if (!rec) 464 if (!rec)
466 return; 465 return;
467 466
468 rec->nr = syscall_nr; 467 rec->nr = syscall_nr;
469 syscall_get_arguments(current, regs, 0, sys_data->nb_args, 468 syscall_get_arguments(current, regs, 0, sys_data->nb_args,
470 (unsigned long *)&rec->args); 469 (unsigned long *)&rec->args);
471 perf_trace_buf_submit(rec, size, rctx, 0, 1, flags, regs, 470 perf_trace_buf_submit(rec, size, rctx, 0, 1, regs,
472 sys_data->enter_event->perf_data); 471 sys_data->enter_event->perf_data);
473} 472}
474 473
@@ -511,7 +510,6 @@ static void perf_syscall_exit(struct pt_regs *regs, long ret)
511{ 510{
512 struct syscall_metadata *sys_data; 511 struct syscall_metadata *sys_data;
513 struct syscall_trace_exit *rec; 512 struct syscall_trace_exit *rec;
514 unsigned long flags;
515 int syscall_nr; 513 int syscall_nr;
516 int rctx; 514 int rctx;
517 int size; 515 int size;
@@ -537,14 +535,14 @@ static void perf_syscall_exit(struct pt_regs *regs, long ret)
537 return; 535 return;
538 536
539 rec = (struct syscall_trace_exit *)perf_trace_buf_prepare(size, 537 rec = (struct syscall_trace_exit *)perf_trace_buf_prepare(size,
540 sys_data->exit_event->id, &rctx, &flags); 538 sys_data->exit_event->id, regs, &rctx);
541 if (!rec) 539 if (!rec)
542 return; 540 return;
543 541
544 rec->nr = syscall_nr; 542 rec->nr = syscall_nr;
545 rec->ret = syscall_get_return_value(current, regs); 543 rec->ret = syscall_get_return_value(current, regs);
546 544
547 perf_trace_buf_submit(rec, size, rctx, 0, 1, flags, regs, 545 perf_trace_buf_submit(rec, size, rctx, 0, 1, regs,
548 sys_data->exit_event->perf_data); 546 sys_data->exit_event->perf_data);
549} 547}
550 548