[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 06/18] trace: break circular dependancy in ev
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v3 06/18] trace: break circular dependancy in event-internal.h |
Date: |
Mon, 19 Sep 2016 19:08:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Typo in subject: dependancy -> dependency
Daniel P Berrange writes:
> Currently event-internal.h includes generated-events.h,
> while generated-events.h includes event-internal.h
> causing a circular dependency.
> event-internal.h requires that the content of
> generated-events.h comes first, so that it can see
> the typedefs for TraceEventID and TraceEventVCPUID.
> Switching the TraceEvent struct to use uint32_t
> for the two ID fields, removes the dependency on
> the typedef, allowing events-internal.h to be a
> self-contained header. This will then let the patch
> following this move event-internal.h to the top of
> generated-events.h, so we can expose TraceEvent
> struct variables in generated-events.h
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> trace/event-internal.h | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
> diff --git a/trace/event-internal.h b/trace/event-internal.h
> index 3b9ceb5..36906e2 100644
> --- a/trace/event-internal.h
> +++ b/trace/event-internal.h
> @@ -10,9 +10,6 @@
> #ifndef TRACE__EVENT_INTERNAL_H
> #define TRACE__EVENT_INTERNAL_H
> -#include "trace/generated-events.h"
> -
> -
> /**
> * TraceEvent:
> * @id: Unique event identifier.
> @@ -28,8 +25,8 @@
> * Opaque generic description of a tracing event.
> */
> typedef struct TraceEvent {
> - TraceEventID id;
> - TraceEventVCPUID vcpu_id;
> + uint32_t id;
> + uint32_t vcpu_id;
Shouldn't these be 'size_t' for consistency with your iterator patch?
> const char * name;
> const bool sstate;
> uint16_t *dstate;
> --
> 2.7.4
Cheers,
Lluis
- Re: [Qemu-devel] [PATCH v3 01/18] trace: add trace event iterator APIs, (continued)
- [Qemu-devel] [PATCH v3 03/18] trace: remove some now unused functions, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 05/18] trace: remove duplicate control.h includes in generated-tracers.h, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]' array, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 06/18] trace: break circular dependancy in event-internal.h, Daniel P. Berrange, 2016/09/19
- Re: [Qemu-devel] [PATCH v3 06/18] trace: break circular dependancy in event-internal.h,
Lluís Vilanova <=
- [Qemu-devel] [PATCH v3 12/18] trace: dynamically allocate trace_dstate in CPUState, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 08/18] trace: remove the TraceEventID and TraceEventVCPUID enums, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 09/18] trace: emit name <-> ID mapping in simpletrace header, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 15/18] trace: rename _read_events to read_events, Daniel P. Berrange, 2016/09/19
- [Qemu-devel] [PATCH v3 07/18] trace: give each trace event a named TraceEvent struct, Daniel P. Berrange, 2016/09/19