函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:register_stat_tracer

函数原型:int register_stat_tracer(struct tracer_stat *trace)

返回类型:int

参数:

类型参数名称
struct tracer_stat *trace
311  ret等于负EINVAL
313  如果非trace则返回:负EINVAL
316  如果非stat_start或非stat_next或非stat_show则返回:负EINVAL
320  mutex_lock( & all_stat_sessions_mutex)
322  如果ts恒等于trace则转到:out
326  ret等于负ENOMEM
328  session等于分配内存并置零
329  如果非session则转到:out
332  ts等于trace
333  初始化链表头
334  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & stat_mutex)
336  ret等于init_stat_file(session)
337  如果ret
338  destroy_session(session)
339  转到:out
342  ret等于0
344  添加链表项
345  out :
346  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.
348  返回:ret
调用者
名称描述
init_annotated_branch_stats