qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL v2 07/20] trace: break circular dependency in event-internal.h
Date: Wed, 12 Oct 2016 10:47:25 +0200	[thread overview]
Message-ID: <1476262058-13936-8-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1476262058-13936-1-git-send-email-stefanha@redhat.com>

From: "Daniel P. Berrange" <berrange@redhat.com>

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

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1475588159-30598-9-git-send-email-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 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

  parent reply	other threads:[~2016-10-12  8:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  8:47 [Qemu-devel] [PULL v2 00/20] Tracing patches Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 01/20] trace: move colo trace events to net/ sub-directory Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 02/20] trace: add trace event iterator APIs Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 03/20] trace: convert code to use event iterators Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 04/20] trace: remove some now unused functions Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 05/20] trace: remove global 'uint16 dstate[]' array Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 06/20] trace: remove duplicate control.h includes in generated-tracers.h Stefan Hajnoczi
2016-10-12  8:47 ` Stefan Hajnoczi [this message]
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 08/20] trace: give each trace event a named TraceEvent struct Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 09/20] trace: remove the TraceEventID and TraceEventVCPUID enums Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 10/20] trace: emit name <-> ID mapping in simpletrace header Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 11/20] trace: don't abort qemu if ftrace can't be initialized Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 12/20] trace: provide mechanism for registering trace events Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 13/20] trace: dynamically allocate trace_dstate in CPUState Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 14/20] trace: dynamically allocate event IDs at runtime Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 15/20] trace: get rid of generated-events.h/generated-events.c Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 16/20] trace: rename _read_events to read_events Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 17/20] trace: push reading of events up a level to tracetool main Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 18/20] trace: pass trace-events to tracetool as a positional param Stefan Hajnoczi
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 19/20] trace: introduce a formal group name for trace events Stefan Hajnoczi
2016-10-13 13:58   ` Paolo Bonzini
2016-10-17 10:28     ` Greg Kurz
2016-10-12  8:47 ` [Qemu-devel] [PULL v2 20/20] trace: Add missing execution mode of guest events Stefan Hajnoczi
2016-10-12 11:13 ` [Qemu-devel] [PULL v2 00/20] Tracing patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476262058-13936-8-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).