函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__create_synth_event

函数原型:static int __create_synth_event(int argc, const char *name, const char **argv)

返回类型:int

参数:

类型参数名称
intargc
const char *name
const char **argv
1295  struct synth_event * event = NULL
1296  consumed等于0, n_fields等于0, ret等于0
1305  如果name[0]恒等于'\0'或argc小于1则返回:负EINVAL
1308  mutex_lock( & event_mutex)
1310  event等于find_synth_event(name)
1311  如果event
1312  ret等于负EEXIST
1313  转到:out
1316 i小于argc减1循环
1317  如果字符串比较恒等于0则继续下一循环
1319  如果n_fields恒等于SYNTH_FIELDS_MAX
1320  ret等于负EINVAL
1321  转到:err
1324  field等于parse_synth_field(argc - i, & argv[i], & consumed)
1325  如果是错误
1326  ret等于错误
1327  转到:err
1329  fields[n_fields++]等于field
1330  i加等于consumed减1
1333  如果i小于argc字符串比较不等于0则
1334  ret等于负EINVAL
1335  转到:err
1338  event等于alloc_synth_event(name, n_fields, fields)
1339  如果是错误
1340  ret等于错误
1341  event = NULL
1342  转到:err
1344  ret等于register_synth_event(event)
1345  如果非retdyn_event_add( & devent)
1347  否则free_synth_event(event)
1349  out :
1350  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.
1352  返回:ret
1353  err :
1354 i小于n_fields循环free_synth_field(fields[i])
1357  转到:out
调用者
名称描述
create_or_delete_synth_event
synth_event_create