trace: [tracetool] Add method 'Event.api' to build event names

Makes it easier to ensure proper naming across the different frontends and backends.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Add methods 'Event.copy' and 'Arguments.copy'

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Spacing changes

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Cosmetic changes

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Show list of frontends and backends sorted by name

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Change format docs to point to the generated file

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [simple] Bump up log version number

The following tracetool cleanup changes the event numbering policy.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
trace: [tracetool] Minimize the amount of per-backend code

Backends now only contain the essential backend-specific code, and most of the work is moved to frontend code.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
configure: Show trace output file conditionally

It is only used with the simple trace backend.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
spice: fix "info spice"

In case no listening address was specified, "info spice" reports
"0.0.0.0" as address.  Which is incorrect in case spice is listening
on ipv6.  Replace it by a wildcard "*" to indicate it is not limited
to a specific address.

Note:  Being more specific is not possible without extending the
spice-server api.  The socket is handled by spice-server not
qemu, so qemu can't easily figure the actual socket address.

Reported-by: David Jaša <djasa@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
spice: fix libvirt snapshots

Only notify spice-server about migration events in case we got
target host information beforehand.  So we kick the seamless spice
client migration only in case a actual live migration happens, not
when libvirt uses live-migration-to-file for snapshotting.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-7' into staging

spice: small fixes

# gpg: Signature made Thu 08 May 2014 09:50:21 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/spice/tags/pull-spice-7:
  spice: fix libvirt snapshots
  spice: fix "info spice"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

Tracing pull request

# gpg: Signature made Wed 07 May 2014 18:14:02 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/tracing-pull-request:
  configure: Show trace output file conditionally
  trace: [tracetool] Minimize the amount of per-backend code
  trace: [simple] Bump up log version number
  trace: [tracetool] Change format docs to point to the generated file
  trace: [tracetool] Show list of frontends and backends sorted by name
  trace: [tracetool] Cosmetic changes
  trace: [tracetool] Spacing changes
  trace: [tracetool] Add methods 'Event.copy' and 'Arguments.copy'
  trace: [tracetool] Add method 'Event.api' to build event names

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
build: Fix per-object variables for Makefile.target

The compiling is done in a subdir, so the extraction of per-object libs
and cflags are referencing objects with ../ prefixed. So prefix the
per-object variables "foo.o-cflags" and "foo.o-libs" to
"../foo.o-cflags" and "../foo.o-libs".

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: simplify Makefile.target a bit, use just one rule for softmmu

On win*, we build QEMU_PROGW (GUI) and create a console app QEMU_PROG
from it, while on non-win*, we make only QEMU_PROG using the same
rules as used for QEMU_PROGW on win*.  Make just one rule for building
main executable, and an additional rule for win* to make console app
from it.  Also consolidate tests for $(QEMU_PROGW).

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
[Fix user-mode compilation. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: simplify Makefile.target around unnest-vars invocations

No need to save/restore obj-y, we can just build all-obj-y incrementally.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile: strip tools and modules too

Commit 52ba784d3 replaced $(STRIP_OPT) with $(STRIP) in some
places (for example, Makefile.target), but not all of them.
There are a few places remain in main Makefile which still
uses $(STRIP_OPT).  Replace these places with $(STRIP) too.

While at it, simplify variable pattern substitution of the
surrounding places, change $(patsubst pat,rep,$(var)) into
$(var:pat=rep) which is much easier to read (this is probably
a good idea to do everywhere).

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Fam Zheng <famz@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile.target: use $(INSTALL_PROG) for installing, not $(INSTALL)

$(INSTALL_PROG) is evaluated to libtool if using libtool, while
$(INSTALL) is not.  Use $(INSTALL_PROG) so that libtool is used
with target too when necessary.  This allows, for example, to
link qemu with shared libcacard.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Fam Zheng <famz@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alon Levy <alevy@redhat.com>
Cc: qemu-trivial@nongnu.org
--
This is done on top of previous patch (using $(STRIP)), but it can
be used by its own.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile: use $(INSTALL_LIB) for modules not $(INSTALL_PROG)

We have $(INSTALL_LIB) which is the same as $(INSTALL_PROG) but
uses correct permissions.  Loadable objects (modules) are like
shared libraries, not like programs.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Fam Zheng <famz@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: add support for per-object -cflags and -libs to all rules

This is needed in order to use per-object flags variables.

Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>