函数逻辑报告 |
Source Code:mm\percpu-stats.c |
Create Date:2022-07-27 18:11:24 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Prints out chunk state. Fragmentation is considered between* the beginning of the chunk to the last allocation.* All statistics are in bytes unless stated otherwise.
函数原型:static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk, int *buffer)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct seq_file * | m | |
| struct pcpu_chunk * | chunk | |
| int * | buffer |
| 60 | cur_min_alloc等于0, cur_med_alloc等于0, cur_max_alloc等于0 |
| 62 | alloc_sizes等于buffer |
| 72 | last_alloc等于如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则last_alloc加1否则0 |
| 75 | as_len等于0 |
| 76 | start等于 the overlap with the previous region to have a page aligned base_addr 除PCPU_MIN_ALLOC_SIZE |
| 87 | 当start小于last_alloc循环 |
| 89 | end等于在内存区域中找到下一个设置位 |
| 91 | alloc_sizes[as_len]等于1 |
| 92 | 否则 |
| 93 | end等于在内存区域中找到下一个设置位 |
| 95 | alloc_sizes[as_len]等于负1 |
| 98 | alloc_sizes[as_len++]乘等于end减start的差乘PCPU_MIN_ALLOC_SIZE |
| 107 | 如果as_len大于0则 |
| 108 | sort(alloc_sizes, as_len, sizeof(int), cmpint, NULL) |
| 116 | cur_min_alloc等于alloc_sizes[i] |
| 117 | cur_med_alloc等于alloc_sizes[(i + as_len - 1) / 2] |
| 118 | cur_max_alloc等于alloc_sizes[as_len - 1] |
| 122 | P("max_alloc_size", max_alloc_size) |
| 123 | P("empty_pop_pages", # of empty populated pages ) |
| 124 | P("first_bit", lock position of first free ) |
| 125 | P("free_bytes", free bytes in the chunk ) |
| 126 | P("contig_bytes", contig hint for block * PCPU_MIN_ALLOC_SIZE) |
| 129 | P("cur_min_alloc", cur_min_alloc) |
| 130 | P("cur_med_alloc", cur_med_alloc) |
| 131 | P("cur_max_alloc", cur_max_alloc) |
| 名称 | 描述 |
|---|---|
| percpu_stats_show |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |