函数逻辑报告 |
Source Code:lib\stackdepot.c |
Create Date:2022-07-27 08:19:40 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:depot_alloc_stack
函数原型:static struct stack_record *depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc, gfp_t alloc_flags)
返回类型:struct stack_record
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| unsigned long * | entries | |
| int | size | |
| u32 | hash | |
| void ** | prealloc | |
| gfp_t | alloc_flags |
| 106 | required_size等于offsetof(structstack_record, entries)加sizeof(unsignedlong)乘size |
| 112 | 如果此条件成立可能性小(为编译器优化)(depot_offset + required_size > STACK_ALLOC_SIZE)则 |
| 113 | 如果此条件成立可能性小(为编译器优化)(depot_index + 1 >= STACK_ALLOC_MAX_SLABS)则 |
| 114 | WARN_ONCE(1, "Stack depot reached limit capacity") |
| 115 | 返回:NULL |
| 117 | depot_index自加 |
| 118 | depot_offset等于0 |
| 124 | 如果depot_index加1小于STACK_ALLOC_MAX_SLABS则smp_store_release( & next_slab_inited, 0) |
| 127 | init_stack_slab(prealloc) |
| 128 | 如果(stack_slabs[depot_index] == NULL)则返回:NULL |
| 133 | Hash in the hastable 等于hash |
| 135 | slabindex等于depot_index |
| 136 | offset等于depot_offset右移STACK_ALLOC_ALIGN位 |
| 137 | valid等于1 |
| 138 | 内存复制( Variable-sized array of entries. , entries, size * sizeof(unsignedlong)) |
| 139 | depot_offset加等于required_size |
| 141 | 返回:stack |
| 名称 | 描述 |
|---|---|
| stack_depot_save | stack_depot_save - Save a stack trace from an array*@entries: Pointer to storage array*@nr_entries: Size of the storage array*@alloc_flags: Allocation gfp flags* Return: The handle of the stack struct stored in depot |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |