Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ftrace.c Create Date:2022-07-28 12:46:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ftrace_enable_sysctl

Proto:int ftrace_enable_sysctl(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)

Type:int

Parameter:

TypeParameterName
struct ctl_table *table
intwrite
void __user *buffer
size_t *lenp
loff_t *ppos
7283  ret = -ENODEV
7285  mutex_lock( & ftrace_lock)
7287  If Value for the false possibility is greater at compile time(race_disabled is set when an anomaly is discovered.* ftrace_disabled is much stronger than ftrace_enabled.) Then Go to out
7290  ret = read a vector of integers
7292  If ret || Not write || last_ftrace_enabled == Not Not race_enabled is a method to turn ftrace on or off Then Go to out
7295  If race_enabled is a method to turn ftrace on or off Then
7298  If cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(ftrace_ops_list, lockdep_is_held( & ftrace_lock)) != ftrace_list_end Then update_ftrace_function()
7302  ftrace_startup_sysctl()
7304  Else
7305  If is_permanent_ops_registered() Then
7307  ret = -EBUSY
7308  Go to out
7312  ftrace_trace_function = ftrace_stub
7314  ftrace_shutdown_sysctl()
7317  last_ftrace_enabled = Not Not race_enabled is a method to turn ftrace on or off
7318  out :
7319  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
7320  Return ret