函数逻辑报告 |
Source Code:kernel\trace\trace_stack.c |
Create Date:2022-07-27 13:18:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:The stack tracer looks for a maximum stack at each call from a function. It* registers a callback from ftrace, and in that callback it examines the stack* size. It determines the stack size from the variable passed in, which is the
函数原型:static void check_stack(unsigned long ip, unsigned long *stack)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned long | ip | |
unsigned long * | stack |
159 | frame_size等于READ_ONCE(tracer_frame) |
162 | this_size等于stack按位与THREAD_SIZE减1 |
165 | this_size减等于frame_size |
167 | 如果this_size小于等于stack_trace_max_size则返回 |
171 | 如果非object_is_on_stack(stack)则返回 |
175 | 如果in_nmi()则返回 |
178 | local_irq_save(flags) |
182 | 如果此条件成立可能性小(为编译器优化)(!frame_size)则this_size减等于tracer_frame |
186 | 如果this_size小于等于stack_trace_max_size则转到:out |
196 | 以i小于stack_trace_nr_entries循环 |
197 | 如果stack_dump_trace[i]恒等于ip则退出 |
205 | 如果i恒等于stack_trace_nr_entries则i等于0 |
211 | x等于0 |
213 | top等于start按位与THREAD_SIZE减1的差的反的值加THREAD_SIZE |
223 | 当i小于stack_trace_nr_entries循环 |
224 | found等于0 |
226 | stack_trace_index[x]等于this_size |
229 | 以p小于top且i小于stack_trace_nr_entries循环 |
235 | stack_dump_trace[x]等于stack_dump_trace[i++] |
238 | found等于1 |
248 | 如果此条件成立可能性小(为编译器优化)(!tracer_frame)则 |
249 | tracer_frame等于p减stack的差乘sizeof(unsignedlong) |
274 | stack_trace_nr_entries等于x |
276 | 如果task_stack_end_corrupted(当前进程)则 |
277 | print_max_stack() |
278 | BUG() |
281 | out : |
282 | arch_spin_unlock( & stack_trace_max_lock) |
283 | local_irq_restore(flags) |
名称 | 描述 |
---|---|
stack_trace_call |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |