[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o
Date: Tue, 28 Mar 2017 09:57:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 27/03/2017 20:21, 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.


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.


>> Tracing code shouldn't call other QEMU code.  That would could create
>> infinite recursion when a trace event is fired.
> If all trace.o needed by libqemuutil.a are linked into libqemuutil.a, 
> libqemuutil.a will not depend on libqemutrace.a. This is what this patch 
> take to break the infinite recursion.
> Or we can link trace/*.o to libqemutrace.a, hope it breaks the infinite 
> recursion. But trace/*.o may still depend on libqemuutil.a
> Or we can just link all trace.o to libqemuutil.a.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]