Lines Matching refs:hdr
43 static struct trace_hdr *hdr; /* Pointer to start of trace buffer */ variable
107 if (hdr->depth > hdr->depth_limit) { in add_ftrace()
108 hdr->ftrace_too_deep_count++; in add_ftrace()
111 if (hdr->ftrace_count < hdr->ftrace_size) { in add_ftrace()
112 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_ftrace()
118 hdr->ftrace_count++; in add_ftrace()
123 if (hdr->ftrace_count < hdr->ftrace_size) { in add_textbase()
124 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_textbase()
130 hdr->ftrace_count++; in add_textbase()
151 if (func < hdr->func_count) { in __cyg_profile_func_enter()
152 hdr->call_accum[func]++; in __cyg_profile_func_enter()
153 hdr->call_count++; in __cyg_profile_func_enter()
155 hdr->untracked_count++; in __cyg_profile_func_enter()
157 hdr->depth++; in __cyg_profile_func_enter()
158 if (hdr->depth > hdr->depth_limit) in __cyg_profile_func_enter()
159 hdr->max_depth = hdr->depth; in __cyg_profile_func_enter()
176 hdr->depth--; in __cyg_profile_func_exit()
208 for (func = upto = 0; func < hdr->func_count; func++) { in trace_list_functions()
209 size_t calls = hdr->call_accum[func]; in trace_list_functions()
265 count = hdr->ftrace_count; in trace_list_calls()
266 if (count > hdr->ftrace_size) in trace_list_calls()
267 count = hdr->ftrace_size; in trace_list_calls()
270 struct trace_call *call = &hdr->ftrace[rec]; in trace_list_calls()
310 print_grouped_ull(hdr->func_count, 10); in trace_print_stats()
312 print_grouped_ull(hdr->call_count, 10); in trace_print_stats()
314 print_grouped_ull(hdr->untracked_count, 10); in trace_print_stats()
316 count = min(hdr->ftrace_count, hdr->ftrace_size); in trace_print_stats()
319 if (hdr->ftrace_count > hdr->ftrace_size) { in trace_print_stats()
321 hdr->ftrace_count - hdr->ftrace_size); in trace_print_stats()
324 printf("%15d maximum observed call depth\n", hdr->max_depth); in trace_print_stats()
325 printf("%15d call depth limit\n", hdr->depth_limit); in trace_print_stats()
326 print_grouped_ull(hdr->ftrace_too_deep_count, 10); in trace_print_stats()
361 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, in trace_init()
363 end = (char *)&hdr->ftrace[min(hdr->ftrace_count, in trace_init()
364 hdr->ftrace_size)]; in trace_init()
365 used = end - (char *)hdr; in trace_init()
369 memcpy(buff, hdr, used); in trace_init()
375 hdr = (struct trace_hdr *)buff; in trace_init()
376 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_init()
384 memset(hdr, '\0', needed); in trace_init()
385 hdr->func_count = func_count; in trace_init()
386 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_init()
389 hdr->ftrace = (struct trace_call *)(buff + needed); in trace_init()
390 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_init()
394 hdr->depth_limit = CONFIG_TRACE_CALL_DEPTH_LIMIT; in trace_init()
417 hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, CONFIG_TRACE_EARLY_SIZE); in trace_early_init()
418 needed = sizeof(*hdr) + func_count * sizeof(uintptr_t); in trace_early_init()
425 memset(hdr, '\0', needed); in trace_early_init()
426 hdr->call_accum = (uintptr_t *)(hdr + 1); in trace_early_init()
427 hdr->func_count = func_count; in trace_early_init()
430 hdr->ftrace = (struct trace_call *)((char *)hdr + needed); in trace_early_init()
431 hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace); in trace_early_init()
433 hdr->depth_limit = CONFIG_TRACE_EARLY_CALL_DEPTH_LIMIT; in trace_early_init()