diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-14 21:50:55 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-10 16:52:58 -0600 |
commit | 2b7a3882e0f70d253fb6a2da5682c94aea4c46f1 (patch) | |
tree | b4aac7e78f7d80bea00fc4e6f3bce3930e2fad1c /lib | |
parent | b8e1f8270ca9667e84eaa4049e006c27e37f3cca (diff) | |
download | u-boot-2b7a3882e0f70d253fb6a2da5682c94aea4c46f1.zip u-boot-2b7a3882e0f70d253fb6a2da5682c94aea4c46f1.tar.gz u-boot-2b7a3882e0f70d253fb6a2da5682c94aea4c46f1.tar.bz2 |
trace: do not limit trace buffer to 2GiB
There is no good reason to limit the trace buffer to 2GiB on a 64bit
system. Adjust the types of the relevant parameters.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trace.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/trace.c b/lib/trace.c index 04780f5..f2402b9 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -190,12 +190,12 @@ void __attribute__((no_instrument_function)) __cyg_profile_func_exit( * greater than buff_size if we ran out of space. * @return 0 if ok, -1 if space was exhausted */ -int trace_list_functions(void *buff, int buff_size, unsigned int *needed) +int trace_list_functions(void *buff, size_t buff_size, size_t *needed) { struct trace_output_hdr *output_hdr = NULL; void *end, *ptr = buff; - int func; - int upto; + size_t func; + size_t upto; end = buff ? buff + buff_size : NULL; @@ -206,7 +206,7 @@ int trace_list_functions(void *buff, int buff_size, unsigned int *needed) /* Add information about each function */ for (func = upto = 0; func < hdr->func_count; func++) { - int calls = hdr->call_accum[func]; + size_t calls = hdr->call_accum[func]; if (!calls) continue; @@ -235,12 +235,12 @@ int trace_list_functions(void *buff, int buff_size, unsigned int *needed) return 0; } -int trace_list_calls(void *buff, int buff_size, unsigned *needed) +int trace_list_calls(void *buff, size_t buff_size, size_t *needed) { struct trace_output_hdr *output_hdr = NULL; void *end, *ptr = buff; - int rec, upto; - int count; + size_t rec, upto; + size_t count; end = buff ? buff + buff_size : NULL; |