[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: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library |
Date: |
Sat, 20 Apr 2013 02:42:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake writes:
> 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.
You cannot load a library in non-dynamic mode, but you can still pass it some
arguments if it's in static mode (CONFIG_TRACE_INSTRUMENT accounts for all
cases), thus the "weirdness" :)
>> @@ -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.
Fixed.
Thanks a lot,
Lluis
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
- [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
- [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
- [Qemu-devel] [PATCH v2 14/23] [trivial] Set the input root directory when parsing QAPI files, Lluís Vilanova, 2013/04/16