qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 ] trace: Multi-backend tracing


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 ] trace: Multi-backend tracing
Date: Mon, 26 May 2014 15:46:01 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, May 13, 2014 at 08:04:13PM +0200, Lluís Vilanova wrote:
> Adds support to compile QEMU with multiple tracing backends at the same time.
> 
> For example, you can compile QEMU with:
> 
>   $ ./configure --enable-trace-backends=ftrace,dtrace
> 
> Where 'ftrace' can be handy for having an in-flight record of events, and 
> 'dtrace' can be later used to extract more information from the system.
> 
> This patch allows having both available without recompiling QEMU.
> 
> Signed-off-by: Lluís Vilanova <address@hidden>
> ---
>  .travis.yml                           |    8 +++--
>  Makefile                              |    4 +--
>  Makefile.target                       |    4 +--
>  configure                             |   44 +++++++++++++-----------------
>  docs/tracing.txt                      |    4 +--
>  qemu-io.c                             |    2 +
>  scripts/tracetool.py                  |   41 ++++++++++++++--------------
>  scripts/tracetool/__init__.py         |   24 +++++++---------
>  scripts/tracetool/backend/__init__.py |   15 +++++-----
>  trace/Makefile.objs                   |   22 +++++++--------
>  trace/control-internal.h              |    4 +--
>  trace/control.c                       |   49 
> ++++++++++++++++++++++++++++++++-
>  trace/control.h                       |   27 +++---------------
>  trace/default.c                       |   40 ---------------------------
>  trace/ftrace.c                        |   25 +----------------
>  trace/ftrace.h                        |    5 +++
>  trace/simple.c                        |   19 +------------
>  trace/simple.h                        |    1 +
>  trace/stderr.c                        |   30 --------------------
>  vl.c                                  |    4 +--
>  20 files changed, 144 insertions(+), 228 deletions(-)
>  delete mode 100644 trace/default.c
>  delete mode 100644 trace/stderr.c

This doesn't seem to work 100% yet:

$ ./configure --target-list=x86_64-softmmu 
--enable-trace-backends=dtrace,simple && make
...
lt LINK vscclient
./.libs/libcacard.so: undefined reference to
`_simple_trace_qemu_anon_ram_alloc'
./.libs/libcacard.so: undefined reference to
`_simple_trace_qemu_anon_ram_free'
./.libs/libcacard.so: undefined reference to `_simple_trace_qemu_vfree'
./.libs/libcacard.so: undefined reference to
`_simple_trace_qemu_memalign'

I also noticed that ./configure invokes tracetool.py with the old
--enable-trace-backend option after applying the patch.  The build
succeeds but the tracetool.py usage is printed.

This is because ./configure stores the command-line in config.status and
reruns itself if config-host.mak needs to be rebuilt.  It's using the
old ./configure command-line that was stashed in config.status.

The good news is this shouldn't affect buildbot but it will probably
surprise all the developers who git pull qemu.git and then see an error
message from ./configure.

Since you are respinning, please consider a fix for this.  Perhaps we
can accept the old command-line argument but not document it.

> @@ -65,16 +65,17 @@ def main(args):
>      global _SCRIPT
>      _SCRIPT = args[0]
>  
> -    long_opts  = [ "backend=", "format=", "help", "list-backends", 
> "check-backend" ]
> -    long_opts += [ "binary=", "target-type=", "target-name=", 
> "probe-prefix=" ]
> +    long_opts = ["backends=", "format=", "help", "list-backends",
> +                 "check-backends"]
> +    long_opts += ["binary=", "target-type=", "target-name=", "probe-prefix="]

Missing tracetool.py help output s/--check-backend/--check-backends/.



reply via email to

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