函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kprobes.c Create Date:2022-07-27 12:38:52
Last Modify:2022-05-22 18:14:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Optimize kprobe if p is ready to be optimized

函数原型:static void optimize_kprobe(struct kprobe *p)

返回类型:void

参数:

类型参数名称
struct kprobe *p
633  如果非Return true(!0) if the kprobe is ready for optimization. 或非NOTE: change this value only with kprobe_mutex held Is this kprobe disabled ? NOTE: change this value only with kprobe_mutex held 则返回
638  如果 Called after addr is executed, unless... 则返回
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  如果Check optimized_kprobe can actually be optimized. 小于0则返回
648  如果* 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.
649  如果optprobe_queued_unopt(op)则
653  返回
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  如果WARN_ON_ONCE(!链表为空)则返回
661  添加链表项
662  Start optimizer after OPTIMIZE_DELAY passed
调用者
名称描述
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.