Lines Matching refs:hdr
41 static struct trace_hdr *hdr; /* Pointer to start of trace buffer */ variable
62 if (hdr->depth > hdr->depth_limit) { in add_ftrace()
63 hdr->ftrace_too_deep_count++; in add_ftrace()
66 if (hdr->ftrace_count < hdr->ftrace_size) { in add_ftrace()
67 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_ftrace()
73 hdr->ftrace_count++; in add_ftrace()
78 if (hdr->ftrace_count < hdr->ftrace_size) { in add_textbase()
79 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_textbase()
85 hdr->ftrace_count++; in add_textbase()
105 if (func < hdr->func_count) { in __cyg_profile_func_enter()
106 hdr->call_accum[func]++; in __cyg_profile_func_enter()
107 hdr->call_count++; in __cyg_profile_func_enter()
109 hdr->untracked_count++; in __cyg_profile_func_enter()
111 hdr->depth++; in __cyg_profile_func_enter()
112 if (hdr->depth > hdr->depth_limit) in __cyg_profile_func_enter()
113 hdr->max_depth = hdr->depth; in __cyg_profile_func_enter()
130 hdr->depth--; in __cyg_profile_func_exit()
161 for (func = upto = 0; func < hdr->func_count; func++) { in trace_list_functions()
162 int calls = hdr->call_accum[func]; in trace_list_functions()
205 count = hdr->ftrace_count; in trace_list_calls()
206 if (count > hdr->ftrace_size) in trace_list_calls()
207 count = hdr->ftrace_size; in trace_list_calls()
210 struct trace_call *call = &hdr->ftrace[rec]; in trace_list_calls()
247 print_grouped_ull(hdr->func_count, 10); in trace_print_stats()
249 print_grouped_ull(hdr->call_count, 10); in trace_print_stats()
251 print_grouped_ull(hdr->untracked_count, 10); in trace_print_stats()
253 count = min(hdr->ftrace_count, hdr->ftrace_size); in trace_print_stats()
256 if (hdr->ftrace_count > hdr->ftrace_size) { in trace_print_stats()
258 hdr->ftrace_count - hdr->ftrace_size); in trace_print_stats()
261 printf("%15d maximum observed call depth\n", hdr->max_depth); in trace_print_stats()
262 printf("%15d call depth limit\n", hdr->depth_limit); in trace_print_stats()
263 print_grouped_ull(hdr->ftrace_too_deep_count, 10); in trace_print_stats()
295 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, in trace_init()
297 end = (char *)&hdr->ftrace[hdr->ftrace_count]; in trace_init()
298 used = end - (char *)hdr; in trace_init()
302 memcpy(buff, hdr, used); in trace_init()
308 hdr = (struct trace_hdr *)buff; in trace_init()
309 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_init()
317 memset(hdr, '\0', needed); in trace_init()
318 hdr->func_count = func_count; in trace_init()
319 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_init()
322 hdr->ftrace = (struct trace_call *)(buff + needed); in trace_init()
323 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_init()
327 hdr->depth_limit = 15; in trace_init()
344 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, CONFIG_TRACE_EARLY_SIZE); in trace_early_init()
345 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_early_init()
352 memset(hdr, '\0', needed); in trace_early_init()
353 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_early_init()
354 hdr->func_count = func_count; in trace_early_init()
357 hdr->ftrace = (struct trace_call *)((char *)hdr + needed); in trace_early_init()
358 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_early_init()
360 hdr->depth_limit = 200; in trace_early_init()