@@ -21,9 +21,6 @@ static int syscall_enter_register(struct ftrace_event_call *event,
21
21
static int syscall_exit_register (struct ftrace_event_call * event ,
22
22
enum trace_reg type , void * data );
23
23
24
- static int syscall_enter_define_fields (struct ftrace_event_call * call );
25
- static int syscall_exit_define_fields (struct ftrace_event_call * call );
26
-
27
24
static struct list_head *
28
25
syscall_get_enter_fields (struct ftrace_event_call * call )
29
26
{
@@ -32,30 +29,6 @@ syscall_get_enter_fields(struct ftrace_event_call *call)
32
29
return & entry -> enter_fields ;
33
30
}
34
31
35
- struct trace_event_functions enter_syscall_print_funcs = {
36
- .trace = print_syscall_enter ,
37
- };
38
-
39
- struct trace_event_functions exit_syscall_print_funcs = {
40
- .trace = print_syscall_exit ,
41
- };
42
-
43
- struct ftrace_event_class event_class_syscall_enter = {
44
- .system = "syscalls" ,
45
- .reg = syscall_enter_register ,
46
- .define_fields = syscall_enter_define_fields ,
47
- .get_fields = syscall_get_enter_fields ,
48
- .raw_init = init_syscall_trace ,
49
- };
50
-
51
- struct ftrace_event_class event_class_syscall_exit = {
52
- .system = "syscalls" ,
53
- .reg = syscall_exit_register ,
54
- .define_fields = syscall_exit_define_fields ,
55
- .fields = LIST_HEAD_INIT (event_class_syscall_exit .fields ),
56
- .raw_init = init_syscall_trace ,
57
- };
58
-
59
32
extern struct syscall_metadata * __start_syscalls_metadata [];
60
33
extern struct syscall_metadata * __stop_syscalls_metadata [];
61
34
@@ -432,7 +405,7 @@ void unreg_event_syscall_exit(struct ftrace_event_call *call)
432
405
mutex_unlock (& syscall_trace_lock );
433
406
}
434
407
435
- int init_syscall_trace (struct ftrace_event_call * call )
408
+ static int init_syscall_trace (struct ftrace_event_call * call )
436
409
{
437
410
int id ;
438
411
int num ;
@@ -457,6 +430,30 @@ int init_syscall_trace(struct ftrace_event_call *call)
457
430
return id ;
458
431
}
459
432
433
+ struct trace_event_functions enter_syscall_print_funcs = {
434
+ .trace = print_syscall_enter ,
435
+ };
436
+
437
+ struct trace_event_functions exit_syscall_print_funcs = {
438
+ .trace = print_syscall_exit ,
439
+ };
440
+
441
+ struct ftrace_event_class event_class_syscall_enter = {
442
+ .system = "syscalls" ,
443
+ .reg = syscall_enter_register ,
444
+ .define_fields = syscall_enter_define_fields ,
445
+ .get_fields = syscall_get_enter_fields ,
446
+ .raw_init = init_syscall_trace ,
447
+ };
448
+
449
+ struct ftrace_event_class event_class_syscall_exit = {
450
+ .system = "syscalls" ,
451
+ .reg = syscall_exit_register ,
452
+ .define_fields = syscall_exit_define_fields ,
453
+ .fields = LIST_HEAD_INIT (event_class_syscall_exit .fields ),
454
+ .raw_init = init_syscall_trace ,
455
+ };
456
+
460
457
unsigned long __init __weak arch_syscall_addr (int nr )
461
458
{
462
459
return (unsigned long )sys_call_table [nr ];
@@ -537,7 +534,7 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
537
534
perf_trace_buf_submit (rec , size , rctx , 0 , 1 , regs , head , NULL );
538
535
}
539
536
540
- int perf_sysenter_enable (struct ftrace_event_call * call )
537
+ static int perf_sysenter_enable (struct ftrace_event_call * call )
541
538
{
542
539
int ret = 0 ;
543
540
int num ;
@@ -558,7 +555,7 @@ int perf_sysenter_enable(struct ftrace_event_call *call)
558
555
return ret ;
559
556
}
560
557
561
- void perf_sysenter_disable (struct ftrace_event_call * call )
558
+ static void perf_sysenter_disable (struct ftrace_event_call * call )
562
559
{
563
560
int num ;
564
561
@@ -615,7 +612,7 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
615
612
perf_trace_buf_submit (rec , size , rctx , 0 , 1 , regs , head , NULL );
616
613
}
617
614
618
- int perf_sysexit_enable (struct ftrace_event_call * call )
615
+ static int perf_sysexit_enable (struct ftrace_event_call * call )
619
616
{
620
617
int ret = 0 ;
621
618
int num ;
@@ -636,7 +633,7 @@ int perf_sysexit_enable(struct ftrace_event_call *call)
636
633
return ret ;
637
634
}
638
635
639
- void perf_sysexit_disable (struct ftrace_event_call * call )
636
+ static void perf_sysexit_disable (struct ftrace_event_call * call )
640
637
{
641
638
int num ;
642
639
0 commit comments