Lines Matching refs:fbuf
18 static struct ftrace_buf *fbuf; variable
46 fbuf = (struct ftrace_buf *)(vaddr_t)finfo->buf_start.ptr64; in ftrace_init()
47 fbuf->head_off = sizeof(struct ftrace_buf); in ftrace_init()
48 count = snprintk((char *)fbuf + fbuf->head_off, MAX_HEADER_STRLEN, in ftrace_init()
53 fbuf->ret_func_ptr = finfo->ret_ptr.ptr64; in ftrace_init()
54 fbuf->ret_idx = 0; in ftrace_init()
55 fbuf->lr_idx = 0; in ftrace_init()
56 fbuf->suspend_time = 0; in ftrace_init()
57 fbuf->buf_off = fbuf->head_off + count; in ftrace_init()
58 fbuf->curr_size = 0; in ftrace_init()
59 fbuf->max_size = fbuf_size - sizeof(struct ftrace_buf) - count; in ftrace_init()
60 fbuf->syscall_trace_enabled = false; in ftrace_init()
61 fbuf->syscall_trace_suspended = false; in ftrace_init()
63 *fbuf_ptr = fbuf; in ftrace_init()
71 if (fbuf) { in ftrace_copy_buf()
73 size_t dump_size = fbuf->buf_off - fbuf->head_off + in ftrace_copy_buf()
74 fbuf->curr_size; in ftrace_copy_buf()
77 copy_func(pctx, (char *)fbuf + fbuf->head_off, dump_size); in ftrace_copy_buf()
83 if (fbuf) { in ftrace_map_lr()
84 if (*lr == fbuf->ret_func_ptr && in ftrace_map_lr()
85 fbuf->lr_idx < fbuf->ret_idx) { in ftrace_map_lr()
86 fbuf->lr_idx++; in ftrace_map_lr()
87 *lr = fbuf->ret_stack[fbuf->ret_idx - fbuf->lr_idx]; in ftrace_map_lr()