[PATCH 2/9] gitlab: disable debug info on CI builds

Alex Bennée posted 9 patches 9 months, 2 weeks ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH 2/9] gitlab: disable debug info on CI builds
Posted by Alex Bennée 9 months, 2 weeks ago
Our default build enables debug info which adds hugely to the size of
the builds as well as the size of cached objects. Disable debug info
across the board to save space and reduce pressure on the CI system.
We still have a number of builds which explicitly enable debug and
related extra asserts like --enable-debug-tcg.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .gitlab-ci.d/buildtest-template.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index d4f145fdb5..d9e69c3237 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -24,6 +24,7 @@
     - ccache --zero-stats
     - section_start configure "Running configure"
     - ../configure --enable-werror --disable-docs --enable-fdt=system
+          --disable-debug-info
           ${TARGETS:+--target-list="$TARGETS"}
           $CONFIGURE_ARGS ||
       { cat config.log meson-logs/meson-log.txt && exit 1; }
-- 
2.39.5


Re: [PATCH 2/9] gitlab: disable debug info on CI builds
Posted by Thomas Huth 9 months, 2 weeks ago
On 28/04/2025 14.59, Alex Bennée wrote:
> Our default build enables debug info which adds hugely to the size of
> the builds as well as the size of cached objects. Disable debug info
> across the board to save space and reduce pressure on the CI system.
> We still have a number of builds which explicitly enable debug and
> related extra asserts like --enable-debug-tcg.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   .gitlab-ci.d/buildtest-template.yml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
> index d4f145fdb5..d9e69c3237 100644
> --- a/.gitlab-ci.d/buildtest-template.yml
> +++ b/.gitlab-ci.d/buildtest-template.yml
> @@ -24,6 +24,7 @@
>       - ccache --zero-stats
>       - section_start configure "Running configure"
>       - ../configure --enable-werror --disable-docs --enable-fdt=system
> +          --disable-debug-info

Do we have any jobs that might show stack traces in the console output ? 
build-oss-fuzz comes to my mind, but that uses a separate script, so we 
should be fine there?

So assuming there are no other jobs around that might need it:

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH 2/9] gitlab: disable debug info on CI builds
Posted by Peter Maydell 9 months, 2 weeks ago
On Mon, 28 Apr 2025 at 15:02, Thomas Huth <thuth@redhat.com> wrote:
>
> On 28/04/2025 14.59, Alex Bennée wrote:
> > Our default build enables debug info which adds hugely to the size of
> > the builds as well as the size of cached objects. Disable debug info
> > across the board to save space and reduce pressure on the CI system.
> > We still have a number of builds which explicitly enable debug and
> > related extra asserts like --enable-debug-tcg.
> >
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > ---
> >   .gitlab-ci.d/buildtest-template.yml | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
> > index d4f145fdb5..d9e69c3237 100644
> > --- a/.gitlab-ci.d/buildtest-template.yml
> > +++ b/.gitlab-ci.d/buildtest-template.yml
> > @@ -24,6 +24,7 @@
> >       - ccache --zero-stats
> >       - section_start configure "Running configure"
> >       - ../configure --enable-werror --disable-docs --enable-fdt=system
> > +          --disable-debug-info
>
> Do we have any jobs that might show stack traces in the console output ?
> build-oss-fuzz comes to my mind, but that uses a separate script, so we
> should be fine there?

If you build with Rust enabled, and the Rust code panics,
then you get a Rust backtrace. But I don't know if that
cares about debug info to get its backtraces: quite
possibly it's an entirely different mechanism.

-- PMM
Re: [PATCH 2/9] gitlab: disable debug info on CI builds
Posted by Manos Pitsidianakis 9 months, 1 week ago
On Mon, 28 Apr 2025 17:20, Peter Maydell <peter.maydell@linaro.org> wrote:
>On Mon, 28 Apr 2025 at 15:02, Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 28/04/2025 14.59, Alex Bennée wrote:
>> > Our default build enables debug info which adds hugely to the size of
>> > the builds as well as the size of cached objects. Disable debug info
>> > across the board to save space and reduce pressure on the CI system.
>> > We still have a number of builds which explicitly enable debug and
>> > related extra asserts like --enable-debug-tcg.
>> >
>> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> > ---
>> >   .gitlab-ci.d/buildtest-template.yml | 1 +
>> >   1 file changed, 1 insertion(+)
>> >
>> > diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
>> > index d4f145fdb5..d9e69c3237 100644
>> > --- a/.gitlab-ci.d/buildtest-template.yml
>> > +++ b/.gitlab-ci.d/buildtest-template.yml
>> > @@ -24,6 +24,7 @@
>> >       - ccache --zero-stats
>> >       - section_start configure "Running configure"
>> >       - ../configure --enable-werror --disable-docs --enable-fdt=system
>> > +          --disable-debug-info
>>
>> Do we have any jobs that might show stack traces in the console output ?
>> build-oss-fuzz comes to my mind, but that uses a separate script, so we
>> should be fine there?
>
>If you build with Rust enabled, and the Rust code panics,
>then you get a Rust backtrace. But I don't know if that
>cares about debug info to get its backtraces: quite
>possibly it's an entirely different mechanism.

It will show addresses and <unknown> instead of symbols if they are 
stripped.