[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 05/13] trace: avoid conditional code compilat
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v7 05/13] trace: avoid conditional code compilation during option parsing |
Date: |
Wed, 31 Aug 2011 10:53:04 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Aug 25, 2011 at 09:18:04PM +0200, Lluís wrote:
> diff --git a/trace/control.h b/trace/control.h
> new file mode 100644
> index 0000000..80526f7
> --- /dev/null
> +++ b/trace/control.h
> @@ -0,0 +1,23 @@
> +/*
> + * Interface for configuring and controlling the state of tracing events.
> + *
> + * Copyright (C) 2011 Lluís Vilanova <address@hidden>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2. See
> + * the COPYING file in the top-level directory.
> + */
> +
> +#ifndef TRACE_CONTROL_H
> +#define TRACE_CONTROL_H
> +
> +#include <stdbool.h>
> +
> +/** Whether any cmdline trace option is avilable. */
s/avilable/available/
> +bool trace_config_init (void);
> +/** Configure output trace file.
> + *
> + * @return Whether cmdline option is available.
> + */
> +bool trace_config_init_file (const char *file);
> +
> +#endif /* TRACE_CONTROL_H */
> diff --git a/trace/dtrace.c b/trace/dtrace.c
> new file mode 100644
> index 0000000..e0121ca
> --- /dev/null
> +++ b/trace/dtrace.c
> @@ -0,0 +1,12 @@
> +#inclued "trace/control.h"
#include
Instead of duplicating all of this I suggest creating
trace/default-backend.c and linking that in for all external trace
backends which do not have qemu -trace ... support.
Stefan
- [Qemu-devel] [PATCH v7 00/13] trace-state: make the behaviour of "disable" consistent across all backends, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 01/13] [simple] Include qemu-timer-common.o in trace-obj-y, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 02/13] trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 03/13] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 04/13] trace: move backend-specific code into the trace/ directory, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 05/13] trace: avoid conditional code compilation during option parsing, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 06/13] trace: generalize the "property" concept in the trace-events file, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 11/13] trace-state: [simple] disable all trace points by default, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 12/13] trace-state: [stderr] add support for dynamically enabling/disabling events, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 13/13] trace: enable all events, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 08/13] trace-state: always compile support for controlling and querying trace event states, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 09/13] trace-state: add "-trace events" argument to control initial state, Lluís, 2011/08/25
- [Qemu-devel] [PATCH v7 07/13] trace-state: separate trace event control and query routines from the simple backend, Lluís, 2011/08/25