[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: Xu, Anthony
Subject: Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o
Date: Mon, 27 Mar 2017 18:21:59 +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.

> 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]