函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:58:25
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:perf_event_ksymbol

函数原型:void perf_event_ksymbol(u16 ksym_type, u64 addr, u32 len, bool unregister, const char *sym)

返回类型:void

参数:

类型参数名称
u16ksym_type
u64addr
u32len
boolunregister
const char *sym
8170  flags等于0
8173  如果非atomic_read( & nr_ksymbol_events)则返回
8176  如果ksym_type大于等于PERF_RECORD_KSYMBOL_TYPE_MAXksym_type恒等于PERF_RECORD_KSYMBOL_TYPE_UNKNOWN则转到:err
8180  长字符串复制
8181  name_len等于strlen - Find the length of a string*@s: The string to be sized加1
8182  当非IS_ALIGNED(name_len, sizeof(u64))循环
8183  name[name_len++]等于'\0'
8184  BUILD_BUG_ON - break compile if a condition is true(KSYM_NAME_LEN % sizeof(u64))
8186  如果unregisterflags或等于PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER
8189  ksymbol_event = (struct perf_ksymbol_event){name = name, name_len = name_len, event_id = {header = {type = PERF_RECORD_KSYMBOL, size = event_id的长度 + name_len, }, addr = addr, len = len, ksym_type = ksym_type, flags = flags, }, }
8205  Iterate all events that need to receive side-band events.* For new callers; ensure that account_pmu_sb_event() includes* your event, otherwise it might not get delivered.
8206  返回
8207  err :
8208  WARN_ONCE(1, "%s: Invalid KSYMBOL type 0x%x\n", __func__, ksym_type)
调用者
名称描述
perf_event_bpf_emit_ksymbols