[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to
From: |
Eric Blake |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
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 <address@hidden>
> ---
> @@ -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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC][PATCH v2 00/23] instrument: Let the user wrap/override specific event tracing routines, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 21/23] build: Fix installation of target-dependant files, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 22/23] instrument: Install headers for dynamic instrumentation clients, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 20/23] instrument: Add client-side API to control event instrumentation, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 19/23] instrument: Add client-side API to control tracing state of events, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 18/23] instrument: Add client-side API to enumerate events, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library, Lluís Vilanova, 2013/04/16
- Re: [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library,
Eric Blake <=
- [Qemu-devel] [PATCH v2 09/23] build: Add variable 'tools-obj-y' for tool-only files, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 08/23] instrument: [static] Call statically linked user-provided routines, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 07/23] system: [linux] Use absolute include path for linux-headers, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 06/23] instrument: [none] Add null instrumentation, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 13/23] qapi: Add a primitive to include other files from a QAPI schema file, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 02/23] trace: [simple] Do not include "trace/simple.h" in generated tracer headers, Lluís Vilanova, 2013/04/16
- [Qemu-devel] [PATCH v2 04/23] tracetool: Use method 'Event.api' to get the name of public routines, Lluís Vilanova, 2013/04/16