[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h |
Date: |
Thu, 22 Sep 2016 09:40:41 +0100 |
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 4a98d09..58f0551 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.
@@ -29,8 +26,8 @@
* Opaque generic description of a tracing event.
*/
typedef struct TraceEvent {
- TraceEventID id;
- TraceEventVCPUID vcpu_id;
+ uint32_t id;
+ uint32_t vcpu_id;
const char * name;
const bool sstate;
uint16_t *dstate;
--
2.7.4
- [Qemu-devel] [PATCH v4 00/17] Refactor trace to allow modular build, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 01/17] trace: add trace event iterator APIs, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 02/17] trace: convert code to use event iterators, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 03/17] trace: remove some now unused functions, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH v4 05/17] trace: remove duplicate control.h includes in generated-tracers.h, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 04/17] trace: remove global 'uint16 dstate[]' array, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 07/17] trace: give each trace event a named TraceEvent struct, Daniel P. Berrange, 2016/09/22
- [Qemu-devel] [PATCH v4 10/17] trace: don't abort qemu if ftrace can't be initialized, Daniel P. Berrange, 2016/09/22