* [U-Boot] [PATCH 1/1] trace: make call depth limit customizable
@ 2019-06-02 11:30 Heinrich Schuchardt
2019-06-22 19:10 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2019-06-02 11:30 UTC (permalink / raw)
To: u-boot
Up to now we had hard coded values for the call depth up to which trace
records are created: 200 for early tracing, 15 thereafter. UEFI
applications reach a call depth of 80 or above.
Provide customizing settings for the call trace depth limit and the early
call trace depth limit. Use the old values as defaults.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/Kconfig | 15 +++++++++++++++
lib/trace.c | 4 ++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/Kconfig b/lib/Kconfig
index 416e63c1c7..e717eb3de5 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -192,6 +192,13 @@ config TRACE_BUFFER_SIZE
the size is too small then 'trace stats' will show a message saying
how many records were dropped due to buffer overflow.
+config TRACE_CALL_DEPTH_LIMIT
+ int "Trace call depth limit"
+ depends on TRACE
+ default 15
+ help
+ Sets the maximum call depth up to which function calls are recorded.
+
config TRACE_EARLY
bool "Enable tracing before relocation"
depends on TRACE
@@ -209,6 +216,14 @@ config TRACE_EARLY_SIZE
Sets the size of the early trace buffer in bytes. This is used to hold
tracing information before relocation.
+config TRACE_EARLY_CALL_DEPTH_LIMIT
+ int "Early trace call depth limit"
+ depends on TRACE_EARLY
+ default 200
+ help
+ Sets the maximum call depth up to which function calls are recorded
+ during early tracing.
+
config TRACE_EARLY_ADDR
hex "Address of early trace buffer in U-Boot"
depends on TRACE_EARLY
diff --git a/lib/trace.c b/lib/trace.c
index a13e5bf228..04780f59d3 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -376,7 +376,7 @@ int __attribute__((no_instrument_function)) trace_init(void *buff,
add_textbase();
puts("trace: enabled\n");
- hdr->depth_limit = 15;
+ hdr->depth_limit = CONFIG_TRACE_CALL_DEPTH_LIMIT;
trace_enabled = 1;
trace_inited = 1;
@@ -410,7 +410,7 @@ int __attribute__((no_instrument_function)) trace_early_init(void)
hdr->ftrace = (struct trace_call *)((char *)hdr + needed);
hdr->ftrace_size = (buff_size - needed) / sizeof(*hdr->ftrace);
add_textbase();
- hdr->depth_limit = 200;
+ hdr->depth_limit = CONFIG_TRACE_EARLY_CALL_DEPTH_LIMIT;
printf("trace: early enable at %08x\n", CONFIG_TRACE_EARLY_ADDR);
trace_enabled = 1;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 1/1] trace: make call depth limit customizable
2019-06-02 11:30 [U-Boot] [PATCH 1/1] trace: make call depth limit customizable Heinrich Schuchardt
@ 2019-06-22 19:10 ` Simon Glass
2019-06-28 13:55 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2019-06-22 19:10 UTC (permalink / raw)
To: u-boot
On Sun, 2 Jun 2019 at 12:30, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Up to now we had hard coded values for the call depth up to which trace
> records are created: 200 for early tracing, 15 thereafter. UEFI
> applications reach a call depth of 80 or above.
>
> Provide customizing settings for the call trace depth limit and the early
> call trace depth limit. Use the old values as defaults.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/Kconfig | 15 +++++++++++++++
> lib/trace.c | 4 ++--
> 2 files changed, 17 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 1/1] trace: make call depth limit customizable
2019-06-22 19:10 ` Simon Glass
@ 2019-06-28 13:55 ` Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2019-06-28 13:55 UTC (permalink / raw)
To: u-boot
On Sat, 22 Jun 2019 at 13:10, Simon Glass <sjg@chromium.org> wrote:
>
> On Sun, 2 Jun 2019 at 12:30, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> > Up to now we had hard coded values for the call depth up to which trace
> > records are created: 200 for early tracing, 15 thereafter. UEFI
> > applications reach a call depth of 80 or above.
> >
> > Provide customizing settings for the call trace depth limit and the early
> > call trace depth limit. Use the old values as defaults.
> >
> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > ---
> > lib/Kconfig | 15 +++++++++++++++
> > lib/trace.c | 4 ++--
> > 2 files changed, 17 insertions(+), 2 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-28 13:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-02 11:30 [U-Boot] [PATCH 1/1] trace: make call depth limit customizable Heinrich Schuchardt
2019-06-22 19:10 ` Simon Glass
2019-06-28 13:55 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.