Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kprobes.c Create Date:2022-07-28 11:35:07
Last Modify:2022-05-22 18:14:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Optimize kprobe if p is ready to be optimized

Proto:static void optimize_kprobe(struct kprobe *p)

Type:void

Parameter:

TypeParameterName
struct kprobe *p
633  If Not Return true(!0) if the kprobe is ready for optimization. || Not NOTE: change this value only with kprobe_mutex held || Is this kprobe disabled ? || NOTE: change this value only with kprobe_mutex held Then Return
638  If Called after addr is executed, unless... Then Return
641  op = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(p, structoptimized_kprobe, kp)
644  If Check optimized_kprobe can actually be optimized. < 0 Then Return
648  If * Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered. & probe is really optimized.* NOTE:* this flag is only for optimized_kprobe. Then
649  If optprobe_queued_unopt(op) Then
653  Return
655  * Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered. |= probe is really optimized.* NOTE:* this flag is only for optimized_kprobe.
658  If WARN_ON_ONCE(!list_empty - tests whether a list is empty*@head: the list to test.) Then Return
661  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.
662  Start optimizer after OPTIMIZE_DELAY passed
Caller
NameDescribe
reuse_unused_kprobeCancel unoptimizing for reusing
try_to_optimize_kprobePrepare an optimized_kprobe and optimize it* NOTE: p must be a normal registered kprobe
optimize_all_kprobes
__arm_kprobePut a breakpoint for a probe. Must be called with text_mutex locked
__disarm_kprobeRemove the breakpoint of a probe. Must be called with text_mutex locked
__unregister_kprobe_topUnregister a kprobe without a scheduler synchronization.