Lines Matching refs:fbuf

55 	if (s->fbuf && s->fbuf->syscall_trace_enabled &&  in get_fbuf()
56 !s->fbuf->syscall_trace_suspended) in get_fbuf()
57 return s->fbuf; in get_fbuf()
71 static bool __noprof fbuf_make_room(struct ftrace_buf *fbuf, size_t size) in fbuf_make_room() argument
73 char *dst = (char *)fbuf + fbuf->buf_off; in fbuf_make_room()
74 const char *src = (char *)fbuf + fbuf->buf_off + size; in fbuf_make_room()
77 fbuf->curr_size -= size; in fbuf_make_room()
79 for (n = 0; n < fbuf->curr_size; n++) in fbuf_make_room()
88 static bool __noprof fbuf_make_room(struct ftrace_buf *fbuf, in fbuf_make_room() argument
91 if (fbuf->buf_off + size > fbuf->max_size) in fbuf_make_room()
94 fbuf->curr_size = 0; in fbuf_make_room()
101 static bool __noprof fbuf_make_room(struct ftrace_buf *fbuf __unused, in fbuf_make_room()
142 struct ftrace_buf *fbuf = NULL; in ftrace_enter() local
146 fbuf = get_fbuf(); in ftrace_enter()
148 if (!fbuf || !fbuf->buf_off || !fbuf->max_size) in ftrace_enter()
151 line_size = ENTRY_SIZE(fbuf->ret_idx); in ftrace_enter()
157 full = (fbuf->curr_size + line_size) > fbuf->max_size; in ftrace_enter()
159 full = !fbuf_make_room(fbuf, line_size); in ftrace_enter()
162 fbuf->curr_size += to_func_enter_fmt((char *)fbuf + in ftrace_enter()
163 fbuf->buf_off + in ftrace_enter()
164 fbuf->curr_size, in ftrace_enter()
165 fbuf->ret_idx, in ftrace_enter()
168 if (fbuf->ret_idx < FTRACE_RETFUNC_DEPTH) { in ftrace_enter()
169 fbuf->ret_stack[fbuf->ret_idx] = *lr; in ftrace_enter()
170 fbuf->begin_time[fbuf->ret_idx] = barrier_read_counter_timer(); in ftrace_enter()
171 fbuf->ret_idx++; in ftrace_enter()
244 struct ftrace_buf *fbuf = NULL; in ftrace_return() local
250 fbuf = get_fbuf(); in ftrace_return()
253 if (fbuf && fbuf->ret_idx && fbuf->ret_idx <= FTRACE_RETFUNC_DEPTH) in ftrace_return()
254 fbuf->ret_idx--; in ftrace_return()
264 line_size = ENTRY_SIZE(fbuf->ret_idx); in ftrace_return()
265 if (fbuf->curr_size < line_size) in ftrace_return()
268 line = (char *)fbuf + fbuf->buf_off + fbuf->curr_size - line_size; in ftrace_return()
279 fbuf->curr_size -= 1; in ftrace_return()
282 ftrace_duration(dur_loc, fbuf->begin_time[fbuf->ret_idx], in ftrace_return()
287 line_size = EXIT_SIZE(fbuf->ret_idx); in ftrace_return()
288 full = (fbuf->curr_size + line_size) > fbuf->max_size; in ftrace_return()
290 full = !fbuf_make_room(fbuf, line_size); in ftrace_return()
293 line = (char *)fbuf + fbuf->buf_off + fbuf->curr_size; in ftrace_return()
295 for (i = 0; i < DURATION_MAX_LEN + fbuf->ret_idx; i++) { in ftrace_return()
306 fbuf->curr_size += line_size - 1; in ftrace_return()
310 fbuf->begin_time[fbuf->ret_idx], in ftrace_return()
315 return fbuf->ret_stack[fbuf->ret_idx]; in ftrace_return()