函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:gcov_info_dup - duplicate profiling data set*@info: profiling data set to duplicate* Return newly allocated duplicate on success, %NULL on error.

函数原型:struct gcov_info *gcov_info_dup(struct gcov_info *info)

返回类型:struct gcov_info

参数:

类型参数名称
struct gcov_info *info
278  dup等于kmemdup(info, dup的长度, GFP_KERNEL)
279  如果非dup则返回:NULL
282  next = NULL
283  filename = NULL
284  functions = NULL
286  filename等于kstrdup(filename, GFP_KERNEL)
287  如果非filename则转到:err_free
290  functions等于分配数组内存并置零
292  如果非functions则转到:err_free
295  active等于Determine number of active counters. Based on gcc magic.
296  fi_size等于sizeof(structgcov_fn_info)
297  fi_size加等于sizeof(structgcov_ctr_info)乘active
299 fi_idx小于n_functions循环
300  functions[fi_idx]等于分配内存并置零
301  如果非functions[fi_idx]则转到:err_free
304  *functions[fi_idx]等于*functions[fi_idx]
306  sci_ptr等于ctrs
307  dci_ptr等于ctrs
309 ct_idx小于active循环
311  cv_size等于sizeof(gcov_type)乘num
313  values等于vmalloc(cv_size)
315  如果非values则转到:err_free
318  num等于num
321  sci_ptr自加
322  dci_ptr自加
326  返回:dup
327  err_free :
328  gcov_info_free - release memory for profiling data set duplicate*@info: profiling data set duplicate to free
329  返回:NULL