diff mbox series

[v7,11/11] sandbox: trace: Increase trace buffer size

Message ID 20230805113458.1430239-12-sughosh.ganu@linaro.org
State Superseded
Headers show
Series Integrate EFI capsule tasks into u-boot's build flow | expand

Commit Message

Sughosh Ganu Aug. 5, 2023, 11:34 a.m. UTC
When running the trace test on the sandbox platform, the current size
of 16MiB is no longer large enough for capturing the entire trace
history, and results in truncation. Use a size of 32MiB for the trace
buffer on the sandbox platform while running the trace test.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since V6:
* New patch for fixing CI trace test failure.

 .azure-pipelines.yml        | 2 +-
 .gitlab-ci.yml              | 2 +-
 test/py/tests/test_trace.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass Aug. 5, 2023, 3:04 p.m. UTC | #1
Hi Sughosh,

On Sat, 5 Aug 2023 at 05:36, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> When running the trace test on the sandbox platform, the current size
> of 16MiB is no longer large enough for capturing the entire trace
> history, and results in truncation. Use a size of 32MiB for the trace
> buffer on the sandbox platform while running the trace test.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V6:
> * New patch for fixing CI trace test failure.
>
>  .azure-pipelines.yml        | 2 +-
>  .gitlab-ci.yml              | 2 +-
>  test/py/tests/test_trace.py | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Do you know what has made it jump up?

> diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> index 2678e5ae05..2ef4db5318 100644
> --- a/.azure-pipelines.yml
> +++ b/.azure-pipelines.yml
> @@ -275,7 +275,7 @@ stages:
>            TEST_PY_BD: "sandbox"
>            BUILD_ENV: "FTRACE=1 NO_LTO=1"
>            TEST_PY_TEST_SPEC: "trace"
> -          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
> +          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
>          coreboot:
>            TEST_PY_BD: "coreboot"
>            TEST_PY_ID: "--id qemu"
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 8010afae95..3e41299658 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -315,7 +315,7 @@ sandbox trace_test.py:
>      TEST_PY_BD: "sandbox"
>      BUILD_ENV: "FTRACE=1 NO_LTO=1"
>      TEST_PY_TEST_SPEC: "trace"
> -    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
> +    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
>    <<: *buildman_and_testpy_dfn
>
>  evb-ast2500 test.py:
> diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py
> index ac3e95925e..ad2250920d 100644
> --- a/test/py/tests/test_trace.py
> +++ b/test/py/tests/test_trace.py
> @@ -61,7 +61,7 @@ def collect_trace(cons):
>
>      # Read out the trace data
>      addr = 0x02000000
> -    size = 0x01000000
> +    size = 0x02000000
>      out = cons.run_command(f'trace calls {addr:x} {size:x}')
>      print(out)
>      fname = os.path.join(TMPDIR, 'trace')
> --
> 2.34.1
>

Regards,
Simon
Sughosh Ganu Aug. 5, 2023, 5:56 p.m. UTC | #2
hi Simon,

On Sat, 5 Aug 2023 at 20:34, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Sughosh,
>
> On Sat, 5 Aug 2023 at 05:36, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
> >
> > When running the trace test on the sandbox platform, the current size
> > of 16MiB is no longer large enough for capturing the entire trace
> > history, and results in truncation. Use a size of 32MiB for the trace
> > buffer on the sandbox platform while running the trace test.
> >
> > Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> > ---
> > Changes since V6:
> > * New patch for fixing CI trace test failure.
> >
> >  .azure-pipelines.yml        | 2 +-
> >  .gitlab-ci.yml              | 2 +-
> >  test/py/tests/test_trace.py | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Do you know what has made it jump up?

I suspect this is due to the increase in the size of the dtb with all
the additional binman nodes. It starts failing with the last capsule
node being added under the binman node.

-sughosh

>
> > diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> > index 2678e5ae05..2ef4db5318 100644
> > --- a/.azure-pipelines.yml
> > +++ b/.azure-pipelines.yml
> > @@ -275,7 +275,7 @@ stages:
> >            TEST_PY_BD: "sandbox"
> >            BUILD_ENV: "FTRACE=1 NO_LTO=1"
> >            TEST_PY_TEST_SPEC: "trace"
> > -          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
> > +          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
> >          coreboot:
> >            TEST_PY_BD: "coreboot"
> >            TEST_PY_ID: "--id qemu"
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index 8010afae95..3e41299658 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -315,7 +315,7 @@ sandbox trace_test.py:
> >      TEST_PY_BD: "sandbox"
> >      BUILD_ENV: "FTRACE=1 NO_LTO=1"
> >      TEST_PY_TEST_SPEC: "trace"
> > -    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
> > +    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
> >    <<: *buildman_and_testpy_dfn
> >
> >  evb-ast2500 test.py:
> > diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py
> > index ac3e95925e..ad2250920d 100644
> > --- a/test/py/tests/test_trace.py
> > +++ b/test/py/tests/test_trace.py
> > @@ -61,7 +61,7 @@ def collect_trace(cons):
> >
> >      # Read out the trace data
> >      addr = 0x02000000
> > -    size = 0x01000000
> > +    size = 0x02000000
> >      out = cons.run_command(f'trace calls {addr:x} {size:x}')
> >      print(out)
> >      fname = os.path.join(TMPDIR, 'trace')
> > --
> > 2.34.1
> >
>
> Regards,
> Simon
diff mbox series

Patch

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 2678e5ae05..2ef4db5318 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -275,7 +275,7 @@  stages:
           TEST_PY_BD: "sandbox"
           BUILD_ENV: "FTRACE=1 NO_LTO=1"
           TEST_PY_TEST_SPEC: "trace"
-          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
+          OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
         coreboot:
           TEST_PY_BD: "coreboot"
           TEST_PY_ID: "--id qemu"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8010afae95..3e41299658 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -315,7 +315,7 @@  sandbox trace_test.py:
     TEST_PY_BD: "sandbox"
     BUILD_ENV: "FTRACE=1 NO_LTO=1"
     TEST_PY_TEST_SPEC: "trace"
-    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000"
+    OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
   <<: *buildman_and_testpy_dfn
 
 evb-ast2500 test.py:
diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py
index ac3e95925e..ad2250920d 100644
--- a/test/py/tests/test_trace.py
+++ b/test/py/tests/test_trace.py
@@ -61,7 +61,7 @@  def collect_trace(cons):
 
     # Read out the trace data
     addr = 0x02000000
-    size = 0x01000000
+    size = 0x02000000
     out = cons.run_command(f'trace calls {addr:x} {size:x}')
     print(out)
     fname = os.path.join(TMPDIR, 'trace')