| Function report | 
| Source Code: kernel\bpf\btf.c | Create Date:2022-07-28 13:17:54 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Resolve the size of a passed-in "type"* return type: type "u32[x][y]", i.e. BTF_KIND_ARRAY,* *type_size: (x * y * sizeof(u32)). Hence, *type_size always* corresponds to the return type.* *elem_type: u32* *total_nelems: (x * y)
Proto:static const struct btf_type *btf_resolve_size(const struct btf *btf, const struct btf_type *type, u32 *type_size, const struct btf_type **elem_type, u32 *total_nelems)
Type:struct btf_type
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const struct btf * | btf | |
| const struct btf_type * | type | is an array (e.g. u32 array[x][y]) | 
| u32 * | type_size | |
| const struct btf_type ** | elem_type | |
| u32 * | total_nelems | 
| 1065 | const struct btf_type * array_type = NULL | 
| 1067 | nelems = 1 | 
| 1069 | When i < MAX_RESOLVE_DEPTH cycle | 
| 1089 | Break | 
| 1092 | If Not array_type Then array_type = is an array (e.g. u32 array[x][y]) | 
| 1099 | Break | 
| 1102 | Default | 
| 1109 | resolved : | 
| 1114 | total_nelems = nelems | 
| 1117 | Return If array_type Else is an array (e.g. u32 array[x][y]) | 
| Name | Describe | 
|---|---|
| btf_struct_access | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |