函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trace_test_and_set_recursion

函数原型:static __always_inline int trace_test_and_set_recursion(int start, int max)

返回类型:int

参数:

类型参数名称
intstart
intmax
648  val等于trace_recursion
652  如果val按位与TRACE_CONTEXT_MASK的值大于max则返回:0
655  bit等于trace_get_context_bit()加start
656  如果此条件成立可能性小(为编译器优化)(val & (1 << bit))则返回:负1
659  val或等于1左移bit
660  trace_recursion等于val
661  The "volatile" is due to gcc bugs ()
663  返回:bit
调用者
名称描述
function_trace_call
__ftrace_ops_list_func
ftrace_ops_assist_funcIf there's only one function registered but it does not support* recursion, needs RCU protection and/or requires per cpu handling, then* this function will be called by the mcount trampoline.