diff mbox series

tracing: install trace events file only if necessary

Message ID 20230326210446.66170-1-casantos@redhat.com
State New
Headers show
Series tracing: install trace events file only if necessary | expand

Commit Message

Carlos Santos March 26, 2023, 9:04 p.m. UTC
From: Carlos Santos <casantos@redhat.com>

It is required only if linux-user, bsd-user or system emulator is built.

Signed-off-by: Carlos Santos <casantos@redhat.com>
---
 trace/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel P. Berrangé March 27, 2023, 9:23 a.m. UTC | #1
On Sun, Mar 26, 2023 at 06:04:46PM -0300, casantos@redhat.com wrote:
> From: Carlos Santos <casantos@redhat.com>
> 
> It is required only if linux-user, bsd-user or system emulator is built.
> 
> Signed-off-by: Carlos Santos <casantos@redhat.com>
> ---
>  trace/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/trace/meson.build b/trace/meson.build
> index 8e80be895c..3fb41c97a4 100644
> --- a/trace/meson.build
> +++ b/trace/meson.build
> @@ -64,7 +64,7 @@ trace_events_all = custom_target('trace-events-all',
>                                   input: trace_events_files,
>                                   command: [ 'cat', '@INPUT@' ],
>                                   capture: true,
> -                                 install: true,
> +                                 install: have_linux_user or have_bsd_user or have_system,

Trace events are used by our command line tools too qemu-img, qemu-io,
qemu-nbd, qemu-pr-helper, qemu-storage-daemon.

What build scenario are you seeing that does NOT want the trace events
to be present ?   If there is any, then I might even call that situation
a bug, as we want trace events to be available as a debugging mechanism
for everything we build.

With regards,
Daniel
Carlos Santos March 27, 2023, 2:28 p.m. UTC | #2
On Mon, Mar 27, 2023 at 6:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Sun, Mar 26, 2023 at 06:04:46PM -0300, casantos@redhat.com wrote:
> > From: Carlos Santos <casantos@redhat.com>
> >
> > It is required only if linux-user, bsd-user or system emulator is built.
> >
> > Signed-off-by: Carlos Santos <casantos@redhat.com>
> > ---
> >  trace/meson.build | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/trace/meson.build b/trace/meson.build
> > index 8e80be895c..3fb41c97a4 100644
> > --- a/trace/meson.build
> > +++ b/trace/meson.build
> > @@ -64,7 +64,7 @@ trace_events_all = custom_target('trace-events-all',
> >                                   input: trace_events_files,
> >                                   command: [ 'cat', '@INPUT@' ],
> >                                   capture: true,
> > -                                 install: true,
> > +                                 install: have_linux_user or have_bsd_user or have_system,
>
> Trace events are used by our command line tools too qemu-img, qemu-io,
> qemu-nbd, qemu-pr-helper, qemu-storage-daemon.
>
> What build scenario are you seeing that does NOT want the trace events
> to be present ?   If there is any, then I might even call that situation
> a bug, as we want trace events to be available as a debugging mechanism
> for everything we build.

I'm aiming for an embedded system or a VM image that only needs
qemu-ga, in which qemu is built with --enable-trace-backends=nop.
Daniel P. Berrangé March 27, 2023, 2:42 p.m. UTC | #3
On Mon, Mar 27, 2023 at 11:28:05AM -0300, Carlos Santos wrote:
> On Mon, Mar 27, 2023 at 6:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Sun, Mar 26, 2023 at 06:04:46PM -0300, casantos@redhat.com wrote:
> > > From: Carlos Santos <casantos@redhat.com>
> > >
> > > It is required only if linux-user, bsd-user or system emulator is built.
> > >
> > > Signed-off-by: Carlos Santos <casantos@redhat.com>
> > > ---
> > >  trace/meson.build | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/trace/meson.build b/trace/meson.build
> > > index 8e80be895c..3fb41c97a4 100644
> > > --- a/trace/meson.build
> > > +++ b/trace/meson.build
> > > @@ -64,7 +64,7 @@ trace_events_all = custom_target('trace-events-all',
> > >                                   input: trace_events_files,
> > >                                   command: [ 'cat', '@INPUT@' ],
> > >                                   capture: true,
> > > -                                 install: true,
> > > +                                 install: have_linux_user or have_bsd_user or have_system,
> >
> > Trace events are used by our command line tools too qemu-img, qemu-io,
> > qemu-nbd, qemu-pr-helper, qemu-storage-daemon.
> >
> > What build scenario are you seeing that does NOT want the trace events
> > to be present ?   If there is any, then I might even call that situation
> > a bug, as we want trace events to be available as a debugging mechanism
> > for everything we build.
> 
> I'm aiming for an embedded system or a VM image that only needs
> qemu-ga, in which qemu is built with --enable-trace-backends=nop.

How about

  install:   get_option('trace_backends') != 'nop'

?

With regards,
Daniel
Carlos Santos March 27, 2023, 2:44 p.m. UTC | #4
On Mon, Mar 27, 2023 at 11:42 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Mar 27, 2023 at 11:28:05AM -0300, Carlos Santos wrote:
> > On Mon, Mar 27, 2023 at 6:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > >
> > > On Sun, Mar 26, 2023 at 06:04:46PM -0300, casantos@redhat.com wrote:
> > > > From: Carlos Santos <casantos@redhat.com>
> > > >
> > > > It is required only if linux-user, bsd-user or system emulator is built.
> > > >
> > > > Signed-off-by: Carlos Santos <casantos@redhat.com>
> > > > ---
> > > >  trace/meson.build | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/trace/meson.build b/trace/meson.build
> > > > index 8e80be895c..3fb41c97a4 100644
> > > > --- a/trace/meson.build
> > > > +++ b/trace/meson.build
> > > > @@ -64,7 +64,7 @@ trace_events_all = custom_target('trace-events-all',
> > > >                                   input: trace_events_files,
> > > >                                   command: [ 'cat', '@INPUT@' ],
> > > >                                   capture: true,
> > > > -                                 install: true,
> > > > +                                 install: have_linux_user or have_bsd_user or have_system,
> > >
> > > Trace events are used by our command line tools too qemu-img, qemu-io,
> > > qemu-nbd, qemu-pr-helper, qemu-storage-daemon.
> > >
> > > What build scenario are you seeing that does NOT want the trace events
> > > to be present ?   If there is any, then I might even call that situation
> > > a bug, as we want trace events to be available as a debugging mechanism
> > > for everything we build.
> >
> > I'm aiming for an embedded system or a VM image that only needs
> > qemu-ga, in which qemu is built with --enable-trace-backends=nop.
>
> How about
>
>   install:   get_option('trace_backends') != 'nop'
>
> ?

That would be perfect :-)
Carlos Santos March 27, 2023, 5:31 p.m. UTC | #5
On Mon, Mar 27, 2023 at 11:44 AM Carlos Santos <casantos@redhat.com> wrote:
>
> On Mon, Mar 27, 2023 at 11:42 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Mon, Mar 27, 2023 at 11:28:05AM -0300, Carlos Santos wrote:
> > > On Mon, Mar 27, 2023 at 6:23 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > > >
> > > > On Sun, Mar 26, 2023 at 06:04:46PM -0300, casantos@redhat.com wrote:
> > > > > From: Carlos Santos <casantos@redhat.com>
> > > > >
> > > > > It is required only if linux-user, bsd-user or system emulator is built.
> > > > >
> > > > > Signed-off-by: Carlos Santos <casantos@redhat.com>
> > > > > ---
> > > > >  trace/meson.build | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/trace/meson.build b/trace/meson.build
> > > > > index 8e80be895c..3fb41c97a4 100644
> > > > > --- a/trace/meson.build
> > > > > +++ b/trace/meson.build
> > > > > @@ -64,7 +64,7 @@ trace_events_all = custom_target('trace-events-all',
> > > > >                                   input: trace_events_files,
> > > > >                                   command: [ 'cat', '@INPUT@' ],
> > > > >                                   capture: true,
> > > > > -                                 install: true,
> > > > > +                                 install: have_linux_user or have_bsd_user or have_system,
> > > >
> > > > Trace events are used by our command line tools too qemu-img, qemu-io,
> > > > qemu-nbd, qemu-pr-helper, qemu-storage-daemon.
> > > >
> > > > What build scenario are you seeing that does NOT want the trace events
> > > > to be present ?   If there is any, then I might even call that situation
> > > > a bug, as we want trace events to be available as a debugging mechanism
> > > > for everything we build.
> > >
> > > I'm aiming for an embedded system or a VM image that only needs
> > > qemu-ga, in which qemu is built with --enable-trace-backends=nop.
> >
> > How about
> >
> >   install:   get_option('trace_backends') != 'nop'
> >
> > ?
>
> That would be perfect :-)
>
> --
> Carlos Santos
> Senior Software Maintenance Engineer
> Red Hat
> casantos@redhat.com    T: +55-11-3534-6186

I submitted an updated patch. Thanks.
diff mbox series

Patch

diff --git a/trace/meson.build b/trace/meson.build
index 8e80be895c..3fb41c97a4 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -64,7 +64,7 @@  trace_events_all = custom_target('trace-events-all',
                                  input: trace_events_files,
                                  command: [ 'cat', '@INPUT@' ],
                                  capture: true,
-                                 install: true,
+                                 install: have_linux_user or have_bsd_user or have_system,
                                  install_dir: qemu_datadir)
 
 if 'ust' in get_option('trace_backends')