函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-27 15:52:13
Last Modify:2022-05-23 13:52:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pcpu_dump_alloc_info - print out information about pcpu_alloc_info*@lvl: loglevel*@ai: allocation info to dump* Print out information about @ai using loglevel @lvl.

函数原型:static void pcpu_dump_alloc_info(const char *lvl, const struct pcpu_alloc_info *ai)

返回类型:void

参数:

类型参数名称
const char *lvl
const struct pcpu_alloc_info *ai
2170  group_width等于1, cpu_width等于1
2171  empty_str[]等于"--------"
2172  alloc等于0, alloc_end等于0
2176  v等于 0 if grouping unnecessary
2177 v除等于10循环
2178  group_width自加
2180  v等于num_possible_cpus()
2181 v除等于10循环
2182  cpu_width自加
2183  empty_str[min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, cpu_width, empty_str的长度 - 1)]等于'\0'
2185  upa等于alloc_sizeunit_size
2186  width等于upacpu_width加1的和加group_width加3
2187  apl等于unddown_pow_of_two - round the given value down to nearest power of two*@n: parameter* round the given value down to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(两数取大(60 / width, 1))
2189  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
2193 group小于 0 if grouping unnecessary 循环
2194  gi等于groups[group]
2195  unit等于0, unit_end等于0
2197  BUG_ON( aligned # of units % upa)
2198 alloc小于alloc_end循环
2200  如果非allocapl的模则
2204  打印标准信息("[%0*d] ", group_width, group)
2210  否则打印标准信息("%s ", empty_str)
2214  打印标准信息("\n")
调用者
名称描述
pcpu_setup_first_chunkpcpu_setup_first_chunk - initialize the first percpu chunk*@ai: pcpu_alloc_info describing how to percpu area is shaped*@base_addr: mapped address* Initialize the first percpu chunk which contains the kernel static* percpu area