函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:graph_trace_open

函数原型:void graph_trace_open(struct trace_iterator *iter)

返回类型:void

参数:

类型参数名称
struct trace_iterator *iter
1207  private = NULL
1210  gfpflags等于如果Are we running in atomic context? WARNING: this macro cannot* always detect atomic context; in particular, it cannot know about* held spinlocks in non-preemptible kernels. Thus it should not be()或已禁止中断()则DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear否则GFP_KERNEL
1212  data等于分配内存并置零
1213  如果非data则转到:out_err
1216  cpu_data等于alloc_percpu_gfp(structfgraph_cpu_data, gfpflags)
1217  如果非cpu_data则转到:out_err_free
1220  遍历可用CPU(cpu)
1221  pid_t * pid = & (({
1221  ({
1221  循环
1221  const void * __vpp_verify = NULL
1221  当0循环
1221  cpu_data
1221  })
1221  })->last_pid)
1222  int * depth = & (({
1222  ({
1222  循环
1222  const void * __vpp_verify = NULL
1222  当0循环
1222  cpu_data
1222  })
1222  })->depth)
1223  int * ignore = & (({
1223  ({
1223  循环
1223  const void * __vpp_verify = NULL
1223  当0循环
1223  cpu_data
1223  })
1223  })->ignore)
1224  int * depth_irq = & (({
1224  ({
1224  循环
1224  const void * __vpp_verify = NULL
1224  当0循环
1224  cpu_data
1224  })
1224  })->depth_irq)
1226  pid等于负1
1227  depth等于0
1228  ignore等于0
1229  depth_irq等于负1
1232  private等于data
1234  返回
1236  out_err_free :
1237  kfree(data)
1238  out_err :
1239  打印警告信息("function graph tracer: not enough memory\n")