Function report |
Source Code:lib\stackdepot.c |
Create Date:2022-07-28 07:20:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:depot_alloc_stack
Proto:static struct stack_record *depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc, gfp_t alloc_flags)
Type:struct stack_record
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long * | entries | |
int | size | |
u32 | hash | |
void ** | prealloc | |
gfp_t | alloc_flags |
106 | required_size = offsetof(structstack_record, entries) + sizeof(unsignedlong) * size |
110 | required_size = @a is a power of 2 value (required_size, 1 << STACK_ALLOC_ALIGN) |
114 | WARN_ONCE(1, "Stack depot reached limit capacity") |
115 | Return NULL |
117 | depot_index++ |
118 | depot_offset = 0 |
124 | If depot_index + 1 < STACK_ALLOC_MAX_SLABS Then smp_store_release( & next_slab_inited, 0) |
127 | init_stack_slab(prealloc) |
128 | If (stack_slabs[depot_index] == NULL) Then Return NULL |
131 | stack = stack_slabs[depot_index] + depot_offset |
133 | Hash in the hastable = hash |
135 | slabindex = depot_index |
136 | offset = depot_offset >> STACK_ALLOC_ALIGN |
137 | valid = 1 |
138 | No 3D Now!( Variable-sized array of entries. , entries, size * sizeof(unsignedlong)) |
139 | depot_offset += required_size |
141 | Return stack |
Name | Describe |
---|---|
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 |
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 |