aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_syscalls.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index c6514093c95a..1e85b6cc26aa 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -520,14 +520,12 @@ end_recursion:
520 local_irq_restore(flags); 520 local_irq_restore(flags);
521} 521}
522 522
523int reg_prof_syscall_enter(char *name) 523int prof_sysenter_enable(struct ftrace_event_call *call)
524{ 524{
525 int ret = 0; 525 int ret = 0;
526 int num; 526 int num;
527 527
528 num = syscall_name_to_nr(name); 528 num = ((struct syscall_metadata *)call->data)->syscall_nr;
529 if (num < 0 || num >= NR_syscalls)
530 return -ENOSYS;
531 529
532 mutex_lock(&syscall_trace_lock); 530 mutex_lock(&syscall_trace_lock);
533 if (!sys_prof_refcount_enter) 531 if (!sys_prof_refcount_enter)
@@ -543,13 +541,11 @@ int reg_prof_syscall_enter(char *name)
543 return ret; 541 return ret;
544} 542}
545 543
546void unreg_prof_syscall_enter(char *name) 544void prof_sysenter_disable(struct ftrace_event_call *call)
547{ 545{
548 int num; 546 int num;
549 547
550 num = syscall_name_to_nr(name); 548 num = ((struct syscall_metadata *)call->data)->syscall_nr;
551 if (num < 0 || num >= NR_syscalls)
552 return;
553 549
554 mutex_lock(&syscall_trace_lock); 550 mutex_lock(&syscall_trace_lock);
555 sys_prof_refcount_enter--; 551 sys_prof_refcount_enter--;
@@ -625,14 +621,12 @@ end_recursion:
625 local_irq_restore(flags); 621 local_irq_restore(flags);
626} 622}
627 623
628int reg_prof_syscall_exit(char *name) 624int prof_sysexit_enable(struct ftrace_event_call *call)
629{ 625{
630 int ret = 0; 626 int ret = 0;
631 int num; 627 int num;
632 628
633 num = syscall_name_to_nr(name); 629 num = ((struct syscall_metadata *)call->data)->syscall_nr;
634 if (num < 0 || num >= NR_syscalls)
635 return -ENOSYS;
636 630
637 mutex_lock(&syscall_trace_lock); 631 mutex_lock(&syscall_trace_lock);
638 if (!sys_prof_refcount_exit) 632 if (!sys_prof_refcount_exit)
@@ -648,13 +642,11 @@ int reg_prof_syscall_exit(char *name)
648 return ret; 642 return ret;
649} 643}
650 644
651void unreg_prof_syscall_exit(char *name) 645void prof_sysexit_disable(struct ftrace_event_call *call)
652{ 646{
653 int num; 647 int num;
654 648
655 num = syscall_name_to_nr(name); 649 num = ((struct syscall_metadata *)call->data)->syscall_nr;
656 if (num < 0 || num >= NR_syscalls)
657 return;
658 650
659 mutex_lock(&syscall_trace_lock); 651 mutex_lock(&syscall_trace_lock);
660 sys_prof_refcount_exit--; 652 sys_prof_refcount_exit--;