12
12
* Arbitrary large value chosen to be sufficiently large to minimize noise but
13
13
* sufficiently small to complete quickly.
14
14
*/
15
- unsigned int nr_function_calls = 100000 ;
15
+ static unsigned int nr_function_calls = 100000 ;
16
16
module_param (nr_function_calls , uint , 0 );
17
17
MODULE_PARM_DESC (nr_function_calls , "How many times to call the relevant tracee" );
18
18
@@ -21,7 +21,7 @@ MODULE_PARM_DESC(nr_function_calls, "How many times to call the relevant tracee"
21
21
* be called directly or whether it's necessary to go via the list func, which
22
22
* can be significantly more expensive.
23
23
*/
24
- unsigned int nr_ops_relevant = 1 ;
24
+ static unsigned int nr_ops_relevant = 1 ;
25
25
module_param (nr_ops_relevant , uint , 0 );
26
26
MODULE_PARM_DESC (nr_ops_relevant , "How many ftrace_ops to associate with the relevant tracee" );
27
27
@@ -30,23 +30,23 @@ MODULE_PARM_DESC(nr_ops_relevant, "How many ftrace_ops to associate with the rel
30
30
* tracers enabled for distinct functions can force the use of the list func
31
31
* and incur overhead for all call sites.
32
32
*/
33
- unsigned int nr_ops_irrelevant = 0 ;
33
+ static unsigned int nr_ops_irrelevant ;
34
34
module_param (nr_ops_irrelevant , uint , 0 );
35
35
MODULE_PARM_DESC (nr_ops_irrelevant , "How many ftrace_ops to associate with the irrelevant tracee" );
36
36
37
37
/*
38
38
* On architectures with DYNAMIC_FTRACE_WITH_REGS, saving the full pt_regs can
39
39
* be more expensive than only saving the minimal necessary regs.
40
40
*/
41
- bool save_regs = false ;
41
+ static bool save_regs ;
42
42
module_param (save_regs , bool , 0 );
43
43
MODULE_PARM_DESC (save_regs , "Register ops with FTRACE_OPS_FL_SAVE_REGS (save all registers in the trampoline)" );
44
44
45
- bool assist_recursion = false ;
45
+ static bool assist_recursion ;
46
46
module_param (assist_recursion , bool , 0 );
47
47
MODULE_PARM_DESC (assist_reursion , "Register ops with FTRACE_OPS_FL_RECURSION" );
48
48
49
- bool assist_rcu = false ;
49
+ static bool assist_rcu ;
50
50
module_param (assist_rcu , bool , 0 );
51
51
MODULE_PARM_DESC (assist_reursion , "Register ops with FTRACE_OPS_FL_RCU" );
52
52
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(assist_reursion, "Register ops with FTRACE_OPS_FL_RCU");
55
55
* overhead. Sometimes a consistency check using a more expensive tracer is
56
56
* desireable.
57
57
*/
58
- bool check_count = false ;
58
+ static bool check_count ;
59
59
module_param (check_count , bool , 0 );
60
60
MODULE_PARM_DESC (check_count , "Check that tracers are called the expected number of times\n" );
61
61
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(check_count, "Check that tracers are called the expected number
64
64
* runs, but sometimes it can be useful to leave them registered so that they
65
65
* can be inspected through the tracefs 'enabled_functions' file.
66
66
*/
67
- bool persist = false ;
67
+ static bool persist ;
68
68
module_param (persist , bool , 0 );
69
69
MODULE_PARM_DESC (persist , "Successfully load module and leave ftrace ops registered after test completes\n" );
70
70
@@ -114,8 +114,8 @@ static void ops_func_count(unsigned long ip, unsigned long parent_ip,
114
114
self -> count ++ ;
115
115
}
116
116
117
- struct sample_ops * ops_relevant ;
118
- struct sample_ops * ops_irrelevant ;
117
+ static struct sample_ops * ops_relevant ;
118
+ static struct sample_ops * ops_irrelevant ;
119
119
120
120
static struct sample_ops * ops_alloc_init (void * tracee , ftrace_func_t func ,
121
121
unsigned long flags , int nr )
@@ -163,8 +163,8 @@ static void ops_check(struct sample_ops *ops, int nr,
163
163
}
164
164
}
165
165
166
- ftrace_func_t tracer_relevant = ops_func_nop ;
167
- ftrace_func_t tracer_irrelevant = ops_func_nop ;
166
+ static ftrace_func_t tracer_relevant = ops_func_nop ;
167
+ static ftrace_func_t tracer_irrelevant = ops_func_nop ;
168
168
169
169
static int __init ftrace_ops_sample_init (void )
170
170
{
0 commit comments