summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-16 00:15:49 +0300
committerTom Rini <trini@konsulko.com>2023-02-11 20:22:35 +0300
commit9dd665ad333039a1b4f6c39cec088d7bf7eb787d (patch)
treed9ca323ce1600a68ecb99701e73759c37f73d500 /lib
parentdaca66d55f39551c3499de87397f08fbd3795a9b (diff)
downloadu-boot-9dd665ad333039a1b4f6c39cec088d7bf7eb787d.tar.xz
trace: Show a few more stats about tracing
Add a few more useful items into the output. Update the buffers to use hex consistently. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/trace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/trace.c b/lib/trace.c
index 3551ef3a23..c3354a256f 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -319,6 +319,10 @@ void trace_print_stats(void)
printf("%15d call depth limit\n", hdr->depth_limit);
print_grouped_ull(hdr->ftrace_too_deep_count, 10);
puts(" calls not traced due to depth\n");
+ print_grouped_ull(hdr->ftrace_size, 10);
+ puts(" max function calls\n");
+ printf("\ntrace buffer %lx call records %lx\n",
+ (ulong)map_to_sysmem(hdr), (ulong)map_to_sysmem(hdr->ftrace));
}
void notrace trace_set_enabled(int enabled)
@@ -381,7 +385,7 @@ int notrace trace_init(void *buff, size_t buff_size)
hdr = (struct trace_hdr *)buff;
needed = sizeof(*hdr) + func_count * sizeof(uintptr_t);
if (needed > buff_size) {
- printf("trace: buffer size %zd bytes: at least %zd needed\n",
+ printf("trace: buffer size %zx bytes: at least %zx needed\n",
buff_size, needed);
return -ENOSPC;
}
@@ -426,7 +430,7 @@ int notrace trace_early_init(void)
hdr = map_sysmem(CONFIG_TRACE_EARLY_ADDR, CONFIG_TRACE_EARLY_SIZE);
needed = sizeof(*hdr) + func_count * sizeof(uintptr_t);
if (needed > buff_size) {
- printf("trace: buffer size is %zd bytes, at least %zd needed\n",
+ printf("trace: buffer size is %zx bytes, at least %zx needed\n",
buff_size, needed);
return -ENOSPC;
}