Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:38:28
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_event_ksymbol

Proto:void perf_event_ksymbol(u16 ksym_type, u64 addr, u32 len, bool unregister, const char *sym)

Type:void

Parameter:

TypeParameterName
u16ksym_type
u64addr
u32len
boolunregister
const char *sym
8170  flags = 0
8173  If Not atomic_read( & nr_ksymbol_events) Then Return
8176  If ksym_type >= PERF_RECORD_KSYMBOL_TYPE_MAX || ksym_type == PERF_RECORD_KSYMBOL_TYPE_UNKNOWN Then Go to err
8180  Copy a NUL terminated string into a sized buffer
8181  name_len = strlen - Find the length of a string*@s: The string to be sized + 1
8182  When Not IS_ALIGNED(name_len, sizeof(u64)) cycle
8183  name[name_len++] = '\0'
8184  BUILD_BUG_ON - break compile if a condition is true(KSYM_NAME_LEN % sizeof(u64))
8186  If unregister Then flags |= 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 = size of 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  Return
8207  err :
8208  WARN_ONCE(1, "%s: Invalid KSYMBOL type 0x%x\n", __func__, ksym_type)
Caller
NameDescribe
perf_event_bpf_emit_ksymbols