Lines Matching refs:hdr

42 static struct trace_hdr *hdr;	/* Pointer to start of trace buffer */  variable
63 if (hdr->depth > hdr->depth_limit) { in add_ftrace()
64 hdr->ftrace_too_deep_count++; in add_ftrace()
67 if (hdr->ftrace_count < hdr->ftrace_size) { in add_ftrace()
68 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_ftrace()
74 hdr->ftrace_count++; in add_ftrace()
79 if (hdr->ftrace_count < hdr->ftrace_size) { in add_textbase()
80 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_textbase()
86 hdr->ftrace_count++; in add_textbase()
106 if (func < hdr->func_count) { in __cyg_profile_func_enter()
107 hdr->call_accum[func]++; in __cyg_profile_func_enter()
108 hdr->call_count++; in __cyg_profile_func_enter()
110 hdr->untracked_count++; in __cyg_profile_func_enter()
112 hdr->depth++; in __cyg_profile_func_enter()
113 if (hdr->depth > hdr->depth_limit) in __cyg_profile_func_enter()
114 hdr->max_depth = hdr->depth; in __cyg_profile_func_enter()
131 hdr->depth--; in __cyg_profile_func_exit()
162 for (func = upto = 0; func < hdr->func_count; func++) { in trace_list_functions()
163 int calls = hdr->call_accum[func]; in trace_list_functions()
206 count = hdr->ftrace_count; in trace_list_calls()
207 if (count > hdr->ftrace_size) in trace_list_calls()
208 count = hdr->ftrace_size; in trace_list_calls()
211 struct trace_call *call = &hdr->ftrace[rec]; in trace_list_calls()
248 print_grouped_ull(hdr->func_count, 10); in trace_print_stats()
250 print_grouped_ull(hdr->call_count, 10); in trace_print_stats()
252 print_grouped_ull(hdr->untracked_count, 10); in trace_print_stats()
254 count = min(hdr->ftrace_count, hdr->ftrace_size); in trace_print_stats()
257 if (hdr->ftrace_count > hdr->ftrace_size) { in trace_print_stats()
259 hdr->ftrace_count - hdr->ftrace_size); in trace_print_stats()
262 printf("%15d maximum observed call depth\n", hdr->max_depth); in trace_print_stats()
263 printf("%15d call depth limit\n", hdr->depth_limit); in trace_print_stats()
264 print_grouped_ull(hdr->ftrace_too_deep_count, 10); in trace_print_stats()
296 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, in trace_init()
298 end = (char *)&hdr->ftrace[hdr->ftrace_count]; in trace_init()
299 used = end - (char *)hdr; in trace_init()
303 memcpy(buff, hdr, used); in trace_init()
309 hdr = (struct trace_hdr *)buff; in trace_init()
310 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_init()
318 memset(hdr, '\0', needed); in trace_init()
319 hdr->func_count = func_count; in trace_init()
320 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_init()
323 hdr->ftrace = (struct trace_call *)(buff + needed); in trace_init()
324 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_init()
328 hdr->depth_limit = 15; in trace_init()
345 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, CONFIG_TRACE_EARLY_SIZE); in trace_early_init()
346 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_early_init()
353 memset(hdr, '\0', needed); in trace_early_init()
354 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_early_init()
355 hdr->func_count = func_count; in trace_early_init()
358 hdr->ftrace = (struct trace_call *)((char *)hdr + needed); in trace_early_init()
359 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_early_init()
361 hdr->depth_limit = 200; in trace_early_init()