[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control inter
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface |
Date: |
Tue, 26 Mar 2013 08:52:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
On 03/26/2013 08:01 AM, Lluís Vilanova wrote:
> Add QMP commands to control (un)loading of dynamic instrumentation library.
>
> Signed-off-by: Lluís Vilanova <address@hidden>
> ---
> include/qapi/qmp/qerror.h | 9 +++++
> instrument/Makefile.objs | 1 +
> instrument/qapi-schema.json | 33 ++++++++++++++++++++
> instrument/qmp.c | 59 ++++++++++++++++++++++++++++++++++++
> qapi-schema.json | 2 +
> qmp-commands.hx | 71
> +++++++++++++++++++++++++++++++++++++++++++
> qmp.c | 4 ++
> 7 files changed, 179 insertions(+)
> create mode 100644 instrument/qapi-schema.json
> create mode 100644 instrument/qmp.c
>
> +++ b/instrument/qapi-schema.json
> @@ -0,0 +1,33 @@
> +# *-*- Mode: Python -*-*
> +
> +##
> +# @instr-dynamic:
> +#
> +# Whether dynamic trace instrumentation is available.
> +#
> +# Since: 1.4
1.5
> +##
> +{ 'command': 'instr-dynamic',
> + 'returns': 'bool' }
> +
> +##
> +# @instr-load:
> +#
> +# Load a dynamic instrumentation library.
> +#
> +# @path: path to the dynamic instrumentation library
> +# @args: arguments to the dynamic instrumentation library
No trailing underscore here...
> +#
> +# Since: 1.4
1.5
> +##
> +{ 'command': 'instr-load',
> + 'data': { 'path': 'str', 'args_': 'str' } }
...but there is one here. Something is wrong. Furthermore, this is
gross - how does the receiver know how to break args into chunks? This
should be '*args':['str'], taking an optional array of args (omitting is
the same as a 0-length array).
> +##
> +# @instr-unload:
> +#
> +# Unload the current dynamic instrumentation library.
> +#
> +# Since: 1.4
1.5
> +##
> +{ 'command': 'instr-unload' }
Is it possible to load more than one library at a time? If so, then
instr-load needs to return a handle, and instr-unload needs to take a
handle as an argument. Also, a query-instr command might be useful for
showing which library (or libraries) are loaded.
> +++ b/instrument/qmp.c
> @@ -0,0 +1,59 @@
> +/*
> + * QMP interface for dynamic trace instrumentation control commands.
> + *
> + * Copyright (C) 2012 Lluís Vilanova <address@hidden>
It's 2013, now.
> +++ b/qapi-schema.json
> @@ -2360,6 +2360,8 @@
> ##
> { 'command': 'device_del', 'data': {'id': 'str'} }
>
> +input("instrument/qapi-schema.json")
> +
> ##
> # @dump-guest-memory
Unusual placement, having it in the middle of the file in no particular
alphabetic ordering. I would typically expect to see includes done at
the beginning, or maybe at the end, or at least in alphabetical order
where the 'instr-*' commands would fall (but the file is already messy,
so not entirely your fault).
> +instr-load
> +----------
> +
> +Load a dynamic instrumentation library.
> +
> +Arguments:
> +
> +- path: path to the dynamic instrumentation library
Missing out on args documentation.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 07/22] linux-user: Use absolute include path, (continued)
- [Qemu-devel] [PATCH 08/22] instrument: [static] Call statically linked user-provided routines, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 09/22] instrument: [dynamic] Call dynamically linked user-provided routines, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 10/22] instrument: Add internal control interface, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 12/22] qapi: Add a primitive to include other files from a QAPI schema file, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 11/22] instrument: [hmp] Add control interface, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 13/22] [trivial] Set the input root directory when parsing QAPI files, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 15/22] Let makefiles add entries to the set of target architecture objects, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface, Lluís Vilanova, 2013/03/26
- Re: [Qemu-devel] [PATCH 14/22] instrument: [qmp, qapi] Add control interface,
Eric Blake <=
- [Qemu-devel] [PATCH 16/22] instrument: Add commandline options to start with an instrumentation library, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 18/22] instrument: Add client-side API to control tracing state of events, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 17/22] instrument: Add client-side API to enumerate events, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 19/22] instrument: Add client-side API to control event instrumentation, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 20/22] build: Fix installation of target-dependant files, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 21/22] instrument: Install headers for dynamic instrumentation clients, Lluís Vilanova, 2013/03/26
- [Qemu-devel] [PATCH 22/22] trace: Do not use the word 'new' in event arguments, Lluís Vilanova, 2013/03/26