qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Lluís Vilanova" <vilanova@ac.upc.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library
Date: Thu, 18 Apr 2013 21:28:38 -0600	[thread overview]
Message-ID: <5170B9E6.7070208@redhat.com> (raw)
In-Reply-To: <20130416135126.21588.39829.stgit@fimbulvetr.bsc.es>

[-- Attachment #1: Type: text/plain, Size: 2448 bytes --]

On 04/16/2013 07:51 AM, Lluís Vilanova wrote:
> Add commandline options to control initial loading of dynamic instrumentation
> library.
> 
> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> ---

> @@ -688,6 +690,15 @@ static void usage(void)
>  #endif
>             "-bsd type         select emulated BSD type FreeBSD/NetBSD/OpenBSD (default)\n"
>             "\n"
> +#if defined(CONFIG_TRACE_INSTRUMENT)
> +           "Tracing options:\n"
> +#if defined(CONFIG_TRACE_INSTRUMENT_DYNAMIC)
> +           "-instr path       load a dynamic trace instrumentation library\n"
> +#endif
> +           "-instr-arg string\n"
> +           "                  argument to dynamic trace instrumentation library (can be given multiple times)\n"
> +           "\n"

Why do you document -instr-arg unconditionally, but -instr only when
dynamic trace support is enabled; especially since the text of
-instr-arg mentions that it is tied to dynamic tracing?

> @@ -852,6 +866,14 @@ int main(int argc, char **argv)
>              singlestep = 1;
>          } else if (!strcmp(r, "strace")) {
>              do_strace = 1;
> +#if defined(CONFIG_TRACE_INSTRUMENT_DYNAMIC)
> +        } else if (!strcmp(r, "instr")) {
> +            instrument_path = argv[optind++];
> +#endif
> +#if defined(CONFIG_TRACE_INSTRUMENT)
> +        } else if (!strcmp(r, "instr-arg")) {
> +            instr_parse_args(argv[optind++], &instrument_argc, &instrument_argv);
> +#endif

At least your parsing code matches your documentation, but it still
feels weird.

> @@ -3378,6 +3397,14 @@ static const struct qemu_argument arg_table[] = {
>      {"R",          "QEMU_RESERVED_VA", true,  handle_arg_reserved_va,
>       "size",       "reserve 'size' bytes for guest virtual address space"},
>  #endif
> +#if defined(CONFIG_TRACE_INSTRUMENT_DYNAMIC)
> +    {"instr",      "QEMU_INSTR",       true,  handle_arg_instrument,
> +     "path",       "load a dynamic trace instrumentation library"},
> +#endif
> +#if defined(CONFIG_TRACE_INSTRUMENT)
> +    {"instr-arg",  "QEMU_INSTR_ARGS", true,  handle_arg_instrument_arg,
> +     "string",     "argument to dynamic trace instrumentation library (can be given multiple times)"},

Another case of mentioning the term dynamic even when dynamic
instrumentation is not enabled.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-04-19  3:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 13:49 [Qemu-devel] [RFC][PATCH v2 00/23] instrument: Let the user wrap/override specific event tracing routines Lluís Vilanova
2013-04-16 13:49 ` [Qemu-devel] [PATCH v2 01/23] instrument: Add documentation Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 02/23] trace: [simple] Do not include "trace/simple.h" in generated tracer headers Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 03/23] trace: Let the user specify her own trace-events file Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 04/23] tracetool: Use method 'Event.api' to get the name of public routines Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 05/23] trace: Minimize inclusions of "qemu-common.h" to avoid inclusion loops Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 06/23] instrument: [none] Add null instrumentation Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 07/23] system: [linux] Use absolute include path for linux-headers Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 08/23] instrument: [static] Call statically linked user-provided routines Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 09/23] build: Add variable 'tools-obj-y' for tool-only files Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 10/23] instrument: [dynamic] Call dynamically linked user-provided routines Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 11/23] instrument: Add internal control interface Lluís Vilanova
2013-04-16 13:50 ` [Qemu-devel] [PATCH v2 12/23] instrument: [hmp] Add " Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 13/23] qapi: Add a primitive to include other files from a QAPI schema file Lluís Vilanova
2013-04-19  2:49   ` Eric Blake
2013-04-19 12:21     ` Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 14/23] [trivial] Set the input root directory when parsing QAPI files Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 15/23] instrument: [qmp, qapi] Add control interface Lluís Vilanova
2013-04-19  3:07   ` Eric Blake
2013-04-19 23:46     ` Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 16/23] Let makefiles add entries to the set of target architecture objects Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library Lluís Vilanova
2013-04-19  3:28   ` Eric Blake [this message]
2013-04-20  0:42     ` Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 18/23] instrument: Add client-side API to enumerate events Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 19/23] instrument: Add client-side API to control tracing state of events Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 20/23] instrument: Add client-side API to control event instrumentation Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 21/23] build: Fix installation of target-dependant files Lluís Vilanova
2013-04-16 13:51 ` [Qemu-devel] [PATCH v2 22/23] instrument: Install headers for dynamic instrumentation clients Lluís Vilanova
2013-04-16 13:52 ` [Qemu-devel] [PATCH v2 23/23] trace: Do not use the word 'new' in event arguments Lluís Vilanova
2013-04-16 20:52 ` [Qemu-devel] [RFC][PATCH v2 00/23] instrument: Let the user wrap/override specific event tracing routines Lluís Vilanova

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=5170B9E6.7070208@redhat.com \
    --to=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).