All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Xu, Anthony" <anthony.xu@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o
Date: Mon, 3 Apr 2017 12:14:14 +0100	[thread overview]
Message-ID: <20170403111414.GN2768@redhat.com> (raw)
In-Reply-To: <4712D8F4B26E034E80552F30A67BE0B1A42954@ORSMSX112.amr.corp.intel.com>

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

Yeah, I'd suggest doing that - i don't see any benefit in having
them in a separate libqemutrace.a


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

  reply	other threads:[~2017-04-03 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 16:28 [Qemu-devel] [PATCH] Create libqemutrace.a for all trace.o Xu, Anthony
2017-03-27 13:24 ` Stefan Hajnoczi
2017-03-27 18:21   ` Xu, Anthony
2017-03-28  7:57     ` Paolo Bonzini
2017-03-28 19:00       ` Xu, Anthony
2017-04-03 11:14         ` Daniel P. Berrange [this message]
2017-04-03 14:42         ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170403111414.GN2768@redhat.com \
    --to=berrange@redhat.com \
    --cc=anthony.xu@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.