1212 * Arbitrary large value chosen to be sufficiently large to minimize noise but
1313 * sufficiently small to complete quickly.
1414 */
15- unsigned int nr_function_calls = 100000 ;
15+ static unsigned int nr_function_calls = 100000 ;
1616module_param (nr_function_calls , uint , 0 );
1717MODULE_PARM_DESC (nr_function_calls , "How many times to call the relevant tracee" );
1818
@@ -21,7 +21,7 @@ MODULE_PARM_DESC(nr_function_calls, "How many times to call the relevant tracee"
2121 * be called directly or whether it's necessary to go via the list func, which
2222 * can be significantly more expensive.
2323 */
24- unsigned int nr_ops_relevant = 1 ;
24+ static unsigned int nr_ops_relevant = 1 ;
2525module_param (nr_ops_relevant , uint , 0 );
2626MODULE_PARM_DESC (nr_ops_relevant , "How many ftrace_ops to associate with the relevant tracee" );
2727
@@ -30,23 +30,23 @@ MODULE_PARM_DESC(nr_ops_relevant, "How many ftrace_ops to associate with the rel
3030 * tracers enabled for distinct functions can force the use of the list func
3131 * and incur overhead for all call sites.
3232 */
33- unsigned int nr_ops_irrelevant = 0 ;
33+ static unsigned int nr_ops_irrelevant ;
3434module_param (nr_ops_irrelevant , uint , 0 );
3535MODULE_PARM_DESC (nr_ops_irrelevant , "How many ftrace_ops to associate with the irrelevant tracee" );
3636
3737/*
3838 * On architectures with DYNAMIC_FTRACE_WITH_REGS, saving the full pt_regs can
3939 * be more expensive than only saving the minimal necessary regs.
4040 */
41- bool save_regs = false ;
41+ static bool save_regs ;
4242module_param (save_regs , bool , 0 );
4343MODULE_PARM_DESC (save_regs , "Register ops with FTRACE_OPS_FL_SAVE_REGS (save all registers in the trampoline)" );
4444
45- bool assist_recursion = false ;
45+ static bool assist_recursion ;
4646module_param (assist_recursion , bool , 0 );
4747MODULE_PARM_DESC (assist_reursion , "Register ops with FTRACE_OPS_FL_RECURSION" );
4848
49- bool assist_rcu = false ;
49+ static bool assist_rcu ;
5050module_param (assist_rcu , bool , 0 );
5151MODULE_PARM_DESC (assist_reursion , "Register ops with FTRACE_OPS_FL_RCU" );
5252
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(assist_reursion, "Register ops with FTRACE_OPS_FL_RCU");
5555 * overhead. Sometimes a consistency check using a more expensive tracer is
5656 * desireable.
5757 */
58- bool check_count = false ;
58+ static bool check_count ;
5959module_param (check_count , bool , 0 );
6060MODULE_PARM_DESC (check_count , "Check that tracers are called the expected number of times\n" );
6161
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(check_count, "Check that tracers are called the expected number
6464 * runs, but sometimes it can be useful to leave them registered so that they
6565 * can be inspected through the tracefs 'enabled_functions' file.
6666 */
67- bool persist = false ;
67+ static bool persist ;
6868module_param (persist , bool , 0 );
6969MODULE_PARM_DESC (persist , "Successfully load module and leave ftrace ops registered after test completes\n" );
7070
@@ -114,8 +114,8 @@ static void ops_func_count(unsigned long ip, unsigned long parent_ip,
114114 self -> count ++ ;
115115}
116116
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 ;
119119
120120static struct sample_ops * ops_alloc_init (void * tracee , ftrace_func_t func ,
121121 unsigned long flags , int nr )
@@ -163,8 +163,8 @@ static void ops_check(struct sample_ops *ops, int nr,
163163 }
164164}
165165
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 ;
168168
169169static int __init ftrace_ops_sample_init (void )
170170{
0 commit comments