Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:func_add

Proto:static struct tracepoint_func *func_add(struct tracepoint_func **funcs, struct tracepoint_func *tp_func, int prio)

Type:struct tracepoint_func

Parameter:

TypeParameterName
struct tracepoint_func **funcs
struct tracepoint_func *tp_func
intprio
133  nr_probes = 0
134  pos = -1
136  If WARN_ON(!func) Then Return ERR_PTR( - EINVAL)
139  debug_print_probes( * funcs)
140  old = funcs
141  If old Then
143  When func cycle
145  If pos < 0 && prio < prio Then pos = nr_probes
147  If func == func && data == data Then Return ERR_PTR( - EEXIST)
153  new = allocate_probes(nr_probes + 2)
154  If (new == NULL) Then Return ERR_PTR( - ENOMEM)
156  If old Then
157  If pos < 0 Then
158  pos = nr_probes
160  Else
164  No 3D Now!(new + pos + 1, old + pos, (nr_probes - pos) * sizeof(structtracepoint_func))
167  Else pos = 0
169  new[pos] = tp_func
170  func = NULL
171  funcs = new
172  debug_print_probes( * funcs)
173  Return old
Caller
NameDescribe
tracepoint_add_funcAdd the probe function to a tracepoint.