[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o
From: |
Xu, Anthony |
Subject: |
Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o |
Date: |
Tue, 28 Mar 2017 19:00:34 +0000 |
> >>> ./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?
Thanks
Anthony