函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_kprobe.c Create Date:2022-07-27 13:49:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Register a trace_probe and probe_event

函数原型:static int register_trace_kprobe(struct trace_kprobe *tk)

返回类型:int

参数:

类型参数名称
struct trace_kprobe *tk
631  mutex_lock( & event_mutex)
633  old_tk等于find_trace_kprobe(trace_probe_name( & tp), trace_probe_group_name( & tp))
635  如果old_tk
639  ret等于负EEXIST
640  否则
643  转到:end
647  ret等于register_kprobe_event(tk)
648  如果ret
649  打印警告信息("Failed to register probe event(%d)\n", ret)
650  转到:end
654  ret等于Internal register function - just handle k*probes and flags
655  如果ret恒等于负ENOENT且非trace_kprobe_module_exist(tk)则
656  打印警告信息("This probe might be able to register after target module is loaded. Continue.\n")
657  ret等于0
660  如果ret小于0则unregister_kprobe_event(tk)
662  否则dyn_event_add( & devent)
665  end :
666  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
667  返回:ret
调用者
名称描述
trace_kprobe_create