[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o |
Date: |
Mon, 3 Apr 2017 15:42:23 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Tue, Mar 28, 2017 at 07:00:34PM +0000, Xu, Anthony wrote:
> > >>> ./trace.o, ./qapi/trace.o and ./util/trace.o are added into
> > >>> libqemuutil.a to avoid recursive dependencies between
> > >>> libqemuutil.a and libqemutrace.a.
> > >> Why would libqemutrace.a depend on libqemuutil.a?
> > > Each trace.c calls trace_event_register_group to register events,
> > > trace_event_register_group is defined in trace/control.c , which
> > > is linked into libqemuutil.a.
> >
> > Ah:
> >
> > util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
> > util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
> > util-obj-y += control.o
> > util-obj-y += qmp.o
> >
> > With the introduction of libqemutrace.a, I believe these should be moved
> > into libqemutrace.a.
>
> Agreed,
> But it doesn't solve infinite recursion issue. register_module_init is
> needed by libqemutrace.a, which is defined util/module.c.
>
> it is hard to remove libqemutrace.a dependency on libqemuutil.a.
>
> Removing libqemuutil.a dependency on libqemutrace.a is feasible.
> Just like what I did in this patch, include all util related trace.o
> to libqemuutila.
>
> The other simple way is to include all trace.o into libqemuutil.a
>
> What's your opinion?
There's no harm in adding all trace objects into libqemuutil.a. I'd go
that route.
Stefan
signature.asc
Description: PGP signature