Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:trace_probe_init

Proto:int trace_probe_init(struct trace_probe *tp, const char *event, const char *group, bool alloc_filter)

Type:int

Parameter:

TypeParameterName
struct trace_probe *tp
const char *event
const char *group
boolalloc_filter
992  size = sizeof(structtrace_probe_event)
993  ret = 0
995  If Not event || Not group Then Return -EINVAL
998  If alloc_filter Then size += sizeof(structtrace_uprobe_filter)
1001  event = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1002  If Not event Then Return -ENOMEM
1005  Initialization list head
1006  Initialization list head
1007  Initialization list head
1008  Initialization list head
1009  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
1011  call = trace_probe_event_call(tp)
1012  class = class
1013  name = kstrdup(event, GFP_KERNEL)
1014  If Not name Then
1015  ret = -ENOMEM
1016  Go to error
1019  system = kstrdup(group, GFP_KERNEL)
1020  If Not system Then
1021  ret = -ENOMEM
1022  Go to error
1025  Return 0
1027  error :
1028  trace_probe_cleanup(tp)
1029  Return ret
Caller
NameDescribe
alloc_trace_uprobeAllocate new trace_uprobe and initialize it (including uprobes).
alloc_trace_kprobeAllocate new trace_probe and initialize it (including kprobes).