Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Add the probe function to a tracepoint.

Proto:static int tracepoint_add_func(struct tracepoint *tp, struct tracepoint_func *func, int prio)

Type:int

Parameter:

TypeParameterName
struct tracepoint *tp
struct tracepoint_func *func
intprio
233  If regfunc && Not static_key_enabled( & key) Then
234  ret = regfunc()
235  If ret < 0 Then Return ret
239  tp_funcs = 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(funcs, lockdep_is_held( & racepoints_mutex protects the builtin and module tracepoints.* tracepoints_mutex nests inside tracepoint_module_list_mutex.))
241  old = func_add( & tp_funcs, func, prio)
242  If IS_ERR(old) Then
243  WARN_ON_ONCE(PTR_ERR(old) != - ENOMEM)
244  Return PTR_ERR(old)
253  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(funcs, tp_funcs)
254  If Not static_key_enabled( & key) Then static_key_slow_inc( & key)
256  release_probes(old)
257  Return 0
Caller
NameDescribe
tracepoint_probe_register_prioracepoint_probe_register_prio - Connect a probe to a tracepoint with priority*@tp: tracepoint*@probe: probe handler*@data: tracepoint data*@prio: priority of this function over other registered functions* Returns 0 if ok, error value on error